* lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
[gnulib.git] / lib / wait-process.c
index 0fd6f26..7593eea 100644 (file)
@@ -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 <haible@clisp.cons.org>, 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 <config.h>
-#endif
+#include <config.h>
 
 /* 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)