bug-make
[Top][All Lists]
Advanced

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

[bug #63307] make 4.4 passes ignored SIGPIPE on to children


From: Dmitry Goncharov
Subject: [bug #63307] make 4.4 passes ignored SIGPIPE on to children
Date: Tue, 8 Nov 2022 08:58:13 -0500 (EST)

Follow-up Comment #16, bug #63307 (project make):

> It appears that make still performs the same build.  But maybe I just got
something wrong in my test.

For example something like this

++++
$ cat makefile
all: one
one: two
        @echo cp $< $@ >&2
        @cp $< $@
two:
        @echo touch $@ >&2
        @touch $@
$ rm one two
$ # this is make-4.3
$ (sleep 2 ; ~/src/make/4.3/make --debug=b)|:
$ ls one two
ls: cannot access 'one': No such file or directory
ls: cannot access 'two': No such file or directory
$ # this is make which handles sigpipe and completes the build
$ (sleep 2 ; ~/src/make/l64/make --debug=b)|:
received sigpipe
received sigpipe
received sigpipe
received sigpipe
received sigpipe
received sigpipe
received sigpipe
received sigpipe
received sigpipe
received sigpipe
received sigpipe
touch two
received sigpipe
received sigpipe
cp two one
received sigpipe
received sigpipe
received sigpipe
make: write error: stdout
$ ls one two
one  two
----

~/src/make/l64/make is a modified make which has the following sigpipe handler
installed
++++
static void
sigpipe_handler (int sig)
{
    static const char msg[] = "received sigpipe\n";
    write (STDERR_FILENO, msg, sizeof msg);
}
----

i remember you reported that on your system you had to modify make to set
sigpipe to default, otherwise it was ignored.
What about something like
++++
$ cat test.pl
#!/usr/bin/perl

$SIG{'PIPE'} = 'DEFAULT';
system('bash -c "(sleep 4 ; ~/src/make/l64/make --debug=b)|:"');
----


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63307>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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