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/


_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to