bug-make
[Top][All Lists]
Advanced

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

[bug #51014] .SHELLSTATUS not always set correctly when $(shell ...) ter


From: anonymous
Subject: [bug #51014] .SHELLSTATUS not always set correctly when $(shell ...) terminated by signal
Date: Fri, 12 May 2017 14:22:30 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?51014>

                 Summary: .SHELLSTATUS not always set correctly when $(shell
...) terminated by signal
                 Project: make
            Submitted by: None
            Submitted on: Fri 12 May 2017 06:22:29 PM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.2.1
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

It looks like the value of .SHELLSTATUS is not always set correctly when the
$(shell …) command is terminated by a signal.  

Here’s a Makefile which demonstrates this behavior:

STDOUT := $(shell kill -s SEGV $$$$) 
$(info status=$(.SHELLSTATUS) stdout="$(STDOUT)") 

all :
        @echo "done"

On Debian 8 Linux and OSX 10.12.2 using gmake 4.2.1 I get the following
output:

status=0 stdout=" "
done

On Windows 10 also using gmake 4.2.1 I get the following output:

status=267 stdout=" "
done

On Linux and OSX I would have expected the behavior I'm seeing on Windows 10,
where gmake receives a non-zero exit value from the recipe.

Thanks!




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51014>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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