bugmake - Bugs: bug #51014, .SHELLSTATUS not always set...

 
 

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

Submitter:  None
Submitted:  Fri 12 May 2017 06:22:29 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.2.1 Operating System:  POSIX-Based
Fixed Release:  4.3 Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Jul 2017 01:56:59 AM UTC, comment #1: 

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

Paul D. Smith <psmith>
Group administrator
Fri 12 May 2017 06:22:29 PM UTC, original submission:  

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!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by trunkel
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-10 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3
        Triage StatusNone Small Effort
    2017-05-12 trunkel Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code