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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Robert Morell
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
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Robert Morell
Update of bug #51014 (project make):

                  Status:                    None => Fixed                  
             Assigned to:                    None => psmith                
             Open/Closed:                    Open => Closed                
           Fixed Release:                    None => SCM                    
           Triage Status:                    None => Small Effort          

    _______________________________________________________

Follow-up Comment #1:

Fixed pushed to SCM; will be in the next release.  Thanks for the report!

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Loading...