mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Milton D. Miller II" <miltonm@realtime.net>
To: Andrew Morton <akpm@osdl.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Omen Wild <Omen.Wild@Dartmouth.EDU>,
	<linux-kernel@vger.kernel.org>
Subject: Re: call_usermodehelper does not report exit status?
Date: Sat, 20 Sep 2003 13:55:17 -0500 (CDT)	[thread overview]
Message-ID: <200309201855.h8KItHuf000466@sullivan.realtime.net> (raw)
In-Reply-To: <20030919124213.7fc93067.akpm@osdl.org>

Andrew Morton <akpm@osdl.org> wrote:
> Omen Wild <Omen.Wild@Dartmouth.EDU> wrote:
> >
> > I found the call_usermodehelper function and
> > call it with the wait flag set, but I cannot get a non-zero return
> > status of the program to propagate into the kernel.
> 
> This might fix it.


I think you missed the why behind the comment just above your first change.

 		/* We don't have a SIGCHLD signal handler, so this
 		 * always returns -ECHILD, but the important thing is
 		 * that it blocks. */
-		sys_wait4(pid, NULL, 0, NULL);
+		sys_wait4(pid, &sub_info->retval, 0, NULL);


The exit code notices that there is no signal handler for SIGCHILD and
does a fast exit, then we notice when woken up the child no longer exists.

Rusty discovered this back in June when we were trying to fix a checker
error on the wait call, and decided that at the time no one was using the
return value, hence the simpler fix.  

http://linux.bkbits.net:8080/linux-2.5/cset@1.1046.366.23?nav=index.html|src/|src/kernel|related/kernel/kmod.c


milton

  reply	other threads:[~2003-09-20 18:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-19 16:24 Omen Wild
2003-09-19 18:21 ` Andrew Morton
2003-09-19 19:51   ` Omen Wild
2003-09-19 19:42     ` Andrew Morton
2003-09-20 18:55       ` Milton D. Miller II [this message]
2003-09-25 18:41         ` Chris Wright
2003-09-25 19:05           ` Andrew Morton
2003-09-25 19:38             ` Chris Wright

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=200309201855.h8KItHuf000466@sullivan.realtime.net \
    --to=miltonm@realtime.net \
    --cc=Omen.Wild@Dartmouth.EDU \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®