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 12:34:35 +0200

On 2013-09-24 07:40, Eli Zaretskii wrote:
> Could be, as I don't think I've seen any EMX-related changes for a
> long time.
On the contrary, child_execute_job() has been much rewritten between
make-3.99.91 and make-3.99.92.

First, in job.c,
if (dup2 (save_stdout, FD_STDOUT) != 0)
should be modified into
if (dup2 (save_stdout, FD_STDOUT) != FD_STDOUT)
and similarly for save_stderr (and save_stdin).

With this modification (and the spawn-patch), this is now better and
'make' works if the shell function does not return anything
(eg ${shell touch /tmp/bar}). But if it does:

% cat Makefile
foo := ${shell date}
all:
  @echo ${foo}${foo}
%

i obtain

% make
date: write error: Bad file descriptordate: write error: Bad file descriptor
%


Now, magically, if i apply:

% cat patch0
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 11:40:48.432981000 +0159
@@ -2214,7 +2214,7 @@
       CLOSE_ON_EXEC (stdout_fd);
     }
 
-  if (stderr_fd != FD_STDERR)
+  if (0 && stderr_fd != FD_STDERR)
     {
       if (stderr_fd != stdout_fd)
         {
%

the Makefile above (and all the real examples that i have tested so
far) seem to work. Hence, the treatement for stderr must be
erroneous somewhere. I've performed several trials, adding or removing
some code in this area, but didn't manage to make things better.

I'm not so familiar with that kind of plumbing, if someone could see
what is going on... Pavel?

Regards,

Denis Excoffier.





reply via email to

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