bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make 3.99.92 release candidate is available


From: Denis Excoffier
Subject: Re: GNU make 3.99.92 release candidate is available
Date: Tue, 24 Sep 2013 18:49:26 +0200

On 2013-09-24 16:37, Frank Heckenbach wrote:
> Try this patch. I don't use EMX myself, but I noticed this when
> reading through the lastest changes, and it seems to fit your bug
> description.
> 
> --- function.c.orig   2013-09-22 07:53:27.000000000 +0200
> +++ function.c        2013-09-24 16:21:37.000000000 +0200
> @@ -1710,7 +1710,7 @@
>   CLOSE_ON_EXEC(pipedes[1]);
>   CLOSE_ON_EXEC(pipedes[0]);
>   /* Never use fork()/exec() here! Use spawn() instead in exec_command() */
> -  pid = child_execute_job (FD_STDIN, pipedes[1], FD_STDOUT, command_argv, 
> envp);
> +  pid = child_execute_job (FD_STDIN, pipedes[1], FD_STDERR, command_argv, 
> envp);
>   if (pid < 0)
>     perror_with_name (error_prefix, "spawn");
> # else /* ! __EMX__ */
> 
Thank you for pointing this. I should have seen it.

All my tests now pass. I suppose we are at it. Here is the emx-patch, to apply
on make-3.99.92 in order to have a working EMX platform (i suppose). I can say 
that
the spawn-patch applies (still very easily) on top of this and the resulting 
'make'
seems to work well.

% type emx-patch
diff -uNr make-3.99.92-original/function.c make-3.99.92-patched/function.c
--- make-3.99.92-original/function.c    2013-09-22 23:10:37.000000000 +0159
+++ make-3.99.92-patched/function.c     2013-09-24 17:41:53.988328300 +0159
@@ -1710,7 +1710,7 @@
   CLOSE_ON_EXEC(pipedes[1]);
   CLOSE_ON_EXEC(pipedes[0]);
   /* Never use fork()/exec() here! Use spawn() instead in exec_command() */
-  pid = child_execute_job (FD_STDIN, pipedes[1], FD_STDOUT, command_argv, 
envp);
+  pid = child_execute_job (FD_STDIN, pipedes[1], FD_STDERR, command_argv, 
envp);
   if (pid < 0)
     perror_with_name (error_prefix, "spawn");
 # else /* ! __EMX__ */
diff -uNr make-3.99.92-original/job.c make-3.99.92-patched/job.c
--- make-3.99.92-original/job.c 2013-09-21 23:27:13.000000000 +0159
+++ make-3.99.92-patched/job.c  2013-09-24 17:41:53.894577700 +0159
@@ -2234,7 +2234,7 @@
   /* Restore stdout/stdin/stderr of the parent and close temporary FDs.  */
   if (save_stdin >= 0)
     {
-      if (dup2 (save_stdin, FD_STDIN) != 0)
+      if (dup2 (save_stdin, FD_STDIN) != FD_STDIN)
         fatal (NILF, _("Could not restore stdin\n"));
       else
         close (save_stdin);
@@ -2242,7 +2242,7 @@
 
   if (save_stdout >= 0)
     {
-      if (dup2 (save_stdout, FD_STDOUT) != 0)
+      if (dup2 (save_stdout, FD_STDOUT) != FD_STDOUT)
         fatal (NILF, _("Could not restore stdout\n"));
       else
         close (save_stdout);
@@ -2250,7 +2250,7 @@
 
   if (save_stderr >= 0)
     {
-      if (dup2 (save_stderr, FD_STDERR) != 0)
+      if (dup2 (save_stderr, FD_STDERR) != FD_STDERR)
         fatal (NILF, _("Could not restore stderr\n"));
       else
         close (save_stderr);
diff -uNr make-3.99.92-original/job.h make-3.99.92-patched/job.h
--- make-3.99.92-original/job.h 2013-09-21 23:27:13.000000000 +0159
+++ make-3.99.92-patched/job.h  2013-09-24 17:41:53.800827100 +0159
@@ -128,7 +128,7 @@
 # define FD_STDERR      (fileno (stderr))
 # if defined(__EMX__)
 int child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd,
-                       char **argv, char **envp)
+                       char **argv, char **envp);
 # else
 void child_execute_job (int stdin_fd, int stdout_fd, int stderr_fd,
                         char **argv, char **envp) __attribute__ ((noreturn));
%


Regards,

Denis Excoffier.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]