* lib/wait-process.c, lib/wait-process.h, lib/csharpcomp.c,
authorDerek R. Price <derek@ximbiot.com>
Wed, 26 Apr 2006 15:55:46 +0000 (15:55 +0000)
committerDerek R. Price <derek@ximbiot.com>
Wed, 26 Apr 2006 15:55:46 +0000 (15:55 +0000)
lib/execute.c, lib/javacomp.c: Back out previous change.

lib/ChangeLog
lib/csharpcomp.c
lib/execute.c
lib/javacomp.c
lib/wait-process.c
lib/wait-process.h

index 72675902ee5de3afbc3ae97e892bcb115faf0c69..2bd50a790be91cfe6e5b09a206fdf6aecc9a567a 100644 (file)
@@ -1,11 +1,3 @@
-2006-04-25  Derek Price  <derek@ximbiot.com>
-
-       * wait-process.h (wait_subprocess): Accept a new exitsignal argument.
-       * wait-process.c (wait_subprocess): Always set *exitsignal to 0 when
-       present and set it to the offending signal when the child exits due to
-       a signal.
-       * csharpcomp.c, execute.c, javacomp.c: Update all callers.
-
 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
 
        * getdate.y (get_date): When adding relative date, start with the
index e157db67ce9396642c44bc554473892b70e0029b..2344a996224c40fcaf0b97b20cb9924992bafd2e 100644 (file)
@@ -295,8 +295,7 @@ compile_csharp_using_mono (const char * const *sources,
       fclose (fp);
 
       /* Remove zombie process from process list, and retrieve exit status.  */
-      exitstatus = wait_subprocess (child, "mcs", NULL, false, false, true,
-                                   true);
+      exitstatus = wait_subprocess (child, "mcs", false, false, true, true);
 
       for (i = 0; i < sources_count; i++)
        if (argv[argc - sources_count + i] != sources[i])
@@ -367,7 +366,7 @@ compile_csharp_using_sscli (const char * const *sources,
          /* Remove zombie process from process list, and retrieve exit
             status.  */
          exitstatus =
-           wait_subprocess (child, "csc", NULL, false, true, true, false);
+           wait_subprocess (child, "csc", false, true, true, false);
          if (exitstatus != 0)
            csc_present = false;
        }
index add71634175daf006e235961bf7fa62c907eb8db..df6b1eaa842cbcc10a8e98ea7ac586fd670061ed 100644 (file)
@@ -308,7 +308,7 @@ execute (const char *progname,
       unblock_fatal_signals ();
     }
 
-  return wait_subprocess (child, progname, NULL, ignore_sigpipe, null_stderr,
+  return wait_subprocess (child, progname, ignore_sigpipe, null_stderr,
                          slave_process, exit_on_error);
 
 #endif
index e4d60a11f83f7e04bd16689f71c9c1f477a803eb..04013e96e840279b3fc8045762bea0f1dbad12a6 100644 (file)
@@ -240,7 +240,7 @@ compile_java_class (const char * const *java_sources,
            /* Remove zombie process from process list, and retrieve exit
               status.  */
            exitstatus =
-             wait_subprocess (child, "gcj", NULL, false, true, true, false);
+             wait_subprocess (child, "gcj", false, true, true, false);
            if (exitstatus != 0)
              gcj_present = false;
          }
index 0fd6f266766b77285c379dc94acfa13d9472e267..221a39c10e51cf9d4e3c6fd4fb2919077a70b1cb 100644 (file)
@@ -251,7 +251,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 +345,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 +394,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)
index f1f777674043be607fcd961521740ff81e1c06a0..9cdce30478ad299ca682df8505d3e557e9686b73 100644 (file)
@@ -34,14 +34,11 @@ extern "C" {
 
 /* Wait for a subprocess to finish.  Return its exit code.
    If it didn't terminate correctly, exit if exit_on_error is true, otherwise
-   return 127 and set exitsignal if the child terminated because of a signal.
+   return 127.
    Arguments:
    - child is the pid of the subprocess.
    - progname is the name of the program executed by the subprocess, used for
      error messages.
-   - exitsignal is an optional pointer to an int to hold the signal number of
-     any signal that caused the child to exit.  It will be set to zero if this
-     function exits with an error not caused by the child catching a signal.
    - If ignore_sigpipe is true, consider a subprocess termination due to
      SIGPIPE as equivalent to a success.  This is suitable for processes whose
      only purpose is to write to standard output.  This flag can be safely set
@@ -53,7 +50,6 @@ extern "C" {
    - If exit_on_error is true, any error will cause the main process to exit
      with an error status.  */
 extern int wait_subprocess (pid_t child, const char *progname,
-                           int *exitsignal,
                            bool ignore_sigpipe, bool null_stderr,
                            bool slave_process, bool exit_on_error);