Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261943AbTITSzh (ORCPT ); Sat, 20 Sep 2003 14:55:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261946AbTITSzh (ORCPT ); Sat, 20 Sep 2003 14:55:37 -0400 Received: from sullivan.realtime.net ([205.238.132.76]:51469 "EHLO sullivan.realtime.net") by vger.kernel.org with ESMTP id S261943AbTITSze (ORCPT ); Sat, 20 Sep 2003 14:55:34 -0400 Date: Sat, 20 Sep 2003 13:55:17 -0500 (CDT) From: "Milton D. Miller II" Message-Id: <200309201855.h8KItHuf000466@sullivan.realtime.net> To: Andrew Morton Cc: Rusty Russell , Omen Wild , Subject: Re: call_usermodehelper does not report exit status? In-Reply-To: <20030919124213.7fc93067.akpm@osdl.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1281 Lines: 35 Andrew Morton wrote: > Omen Wild 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/