From: NeilBrown <neilb@suse.de>
To: Jes.Sorensen@redhat.com
Cc: linux-raid@vger.kernel.org, dledford@redhat.com, harald@redhat.com
Subject: Re: [PATCH 3/3] execl() only returns in case of error
Date: Tue, 22 Jan 2013 16:48:09 +1100 [thread overview]
Message-ID: <20130122164809.641d05bd@notabene.brown> (raw)
In-Reply-To: <1358774578-2183-4-git-send-email-Jes.Sorensen@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 903 bytes --]
On Mon, 21 Jan 2013 14:22:58 +0100 Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> In case exec fails, fall through and print warning rather than just
> calling exit(1) silently.
>
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
> ---
> util.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/util.c b/util.c
> index 500b2bd..68fd27e 100644
> --- a/util.c
> +++ b/util.c
> @@ -1705,7 +1705,6 @@ int start_mdmon(int devnum)
> }
> }
> }
> - exit(1);
> case -1: pr_err("cannot run mdmon. "
> "Array remains readonly\n");
> return -1;
???
Print the warning, and (still in the child) return to whoever called
start_mdmon()? Not a good idea.
If we want an error when mdmon fails (might be a good idea) we should print
it after the 'wait' returns an error, not in the child.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2013-01-22 5:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 13:22 [PATCH v2 0/3] support launching mdmon via systemctl Jes.Sorensen
2013-01-21 13:22 ` [PATCH 1/3] Add support for launching mdmon via systemctl instead of fork/exec Jes.Sorensen
2013-01-22 5:46 ` NeilBrown
2013-01-22 7:33 ` Jes Sorensen
2013-01-25 11:13 ` Jes Sorensen
2013-01-25 15:05 ` Jes Sorensen
2013-01-21 13:22 ` [PATCH 2/3] systemd .service files for launching mdmon via systemctl Jes.Sorensen
2013-01-21 13:22 ` [PATCH 3/3] execl() only returns in case of error Jes.Sorensen
2013-01-22 5:48 ` NeilBrown [this message]
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=20130122164809.641d05bd@notabene.brown \
--to=neilb@suse.de \
--cc=Jes.Sorensen@redhat.com \
--cc=dledford@redhat.com \
--cc=harald@redhat.com \
--cc=linux-raid@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.