From: Ben Schmidt <mail_ben_schmidt@yahoo.com.au>
To: mlmmj@mlmmj.org
Subject: Re: [mlmmj] [PATCH 00 of 10] mlmmj-maintd.c tweaks
Date: Fri, 28 Jan 2011 17:24:54 +0000 [thread overview]
Message-ID: <4D42FBE6.3040107@yahoo.com.au> (raw)
In-Reply-To: <patchbomb.1296169158@duncow>
On 28/01/11 9:59 AM, Richard Mortimer wrote:
> As mentioned the other day here are a number of patches against
> mlmmj-maintd.c that fix relatively minor issues. I haven't attempted
> to make any changes outside of this one file but intend to look at those
> over the coming month or two as time allows.
Thanks. I'll look at them when my time allows. I have a couple of high
Mlmmj priorities, so it may be a little while, I'm afraid.
> I have also spotted a couple of other issues that I haven't addressed yet.
> The first is the fact that unlink calls never have their error status
> checked.
Yes. This is a problem with unlink and a number of other system calls.
They need to be checked and errors logged appropriately.
Another big issue is that messages related to errno are often logged
when it shouldn't be, so it produces bogus error messages.
In fact, the whole error and logging parts of Mlmmj need a makeover.
This is one of my priorities after getting 1.2.18 out, and I would love
help with it. We need to design a small family of functions and/or
macros that provide a simpler, richer and more consistent interface for
performing logging and handling errors. Then we need to go through the
code and make existing logging use the new interfaces, and add logging
where it's missing for unchecked return codes and so on.
> I was thinking about introducing a myunlink() method that does
> the unlink and reports any error. That would help catch any permissions
> problems. There is a potential that some of the files might not exist
> in all situations (the -probe files for example) so it might not be
> appropriate to log an error in all circumstances.
Yeah, that's right. I think this needs to be done on a case-by-case
basis, not by adding just one myunlink() function.
> Also there are a couple of places in mlmmj-maintd.c where it doesn't find
> the contents of the files that it expects. It just carries onto the next
> file without logging an error.
Yep, of course this should be fixed too.
> Review comments most welcome.
I'll throw them your way when I have time. You may see your changesets
in Hg before or after I review them. We'll see.
Anyone else, of course, is also welcome to make comments. Please ensure
I am CCed if you do, guys.
Cheers,
Ben.
next prev parent reply other threads:[~2011-01-28 17:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 22:59 [mlmmj] [PATCH 00 of 10] mlmmj-maintd.c tweaks Richard Mortimer
2011-01-28 17:24 ` Ben Schmidt [this message]
2012-01-17 14:08 ` Ben Schmidt
2012-01-17 18:06 ` Richard Mortimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D42FBE6.3040107@yahoo.com.au \
--to=mail_ben_schmidt@yahoo.com.au \
--cc=mlmmj@mlmmj.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox