Date: Sat, 25 Jan 2003 22:29:47 +0100 (CET) From: martijn@pacno.net To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/47473: Exitstatus passing in vgetty for external shells is broken Message-ID: <20030125212947.5870E8E3@drain.sewers-2.demon.nl>
next in thread | raw e-mail | index | archive | help
>Number: 47473 >Category: ports >Synopsis: Exitstatus passing in vgetty for external shells is broken >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 25 13:30:01 PST 2003 >Closed-Date: >Last-Modified: >Originator: Martijn Lina >Release: FreeBSD 5.0-RELEASE i386 >Organization: >Environment: FreeBSD 5.0-RELEASE #10 i386 >Description: When an external shell called from vgetty exits, its status isn't passed back to vgetty, because of a work around for a problem on other OSes (a second call of wait(&status) in the SIGCHLD signal handler while the forked shell has already been terminated) >How-To-Repeat: try and get vgetty in DATA/FAX receive mode from a call_program shell and watch the log file at loglevel L_NOISE (5). >Fix: A quick hack which I sent to the current vgetty maintainer (no response yet), commenting out that extra wait(&status): --- voice/libvoice/signal.c.orig Sat Oct 23 23:58:01 1999 +++ voice/libvoice/signal.c Fri Jan 24 22:03:15 2003 @@ -34,23 +34,16 @@ static void signal_sigchld(int sig) { + /* + This appears to break passing back the shells exitstatus to vgetty + pid_t pid; int status; - pid = wait(&status); /* This appears to fix core dumps on HPUX. Maybe this + pid = wait(&status);*/ /* This appears to fix core dumps on HPUX. Maybe this * also fixes the same problem on Solaris. */ signal(SIGCHLD, signal_sigchld); - if (status) { - lprintf(L_WARN, "%s: Got child %d exit status %d signal", - program_name, - pid, - status); - } - else { - lprintf(L_JUNK, "%s: Got child %d exit signal", - program_name, - pid); - } + lprintf(L_JUNK, "%s: Got child status change signal", program_name); queue_event(create_event(SIGNAL_SIGCHLD)); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030125212947.5870E8E3>