X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fwait-process.c;h=7593eeacb28d43e4977e90a67a4b160daf13dddb;hb=6b3d5a4784fead9ed93f8ca3726848afafecbb3a;hp=0fd6f266766b77285c379dc94acfa13d9472e267;hpb=6d8d4e520be656b646a6f5cf7ebebfc31c178022;p=gnulib.git diff --git a/lib/wait-process.c b/lib/wait-process.c index 0fd6f2667..7593eeacb 100644 --- a/lib/wait-process.c +++ b/lib/wait-process.c @@ -1,5 +1,5 @@ /* Waiting for a subprocess to finish. - Copyright (C) 2001-2003 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2006 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -17,9 +17,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #include "wait-process.h" @@ -251,7 +249,7 @@ unregister_slave_subprocess (pid_t child) If it didn't terminate correctly, exit if exit_on_error is true, otherwise return 127. */ int -wait_subprocess (pid_t child, const char *progname, int *exitsignal, +wait_subprocess (pid_t child, const char *progname, bool ignore_sigpipe, bool null_stderr, bool slave_process, bool exit_on_error) { @@ -345,7 +343,6 @@ wait_subprocess (pid_t child, const char *progname, int *exitsignal, WAIT_T status; *(int *) &status = 0; - if (exitsignal) *exitsignal = 0; for (;;) { int result = waitpid (child, &status, 0); @@ -395,7 +392,6 @@ wait_subprocess (pid_t child, const char *progname, int *exitsignal, error (exit_on_error ? EXIT_FAILURE : 0, 0, _("%s subprocess got fatal signal %d"), progname, (int) WTERMSIG (status)); - if (exitsignal) *exitsignal = WTERMSIG (status); return 127; } if (WEXITSTATUS (status) == 127)