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


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

Submitted by:  None
Submitted on:  Fri 12 May 2017 06:22:29 PM UTC  
Severity: 3 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.2.1Operating System: POSIX-Based
Fixed Release: SCMTriage Status: Small Effort

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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>
Project AdministratorIn charge of this item.
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=" "

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

status=267 stdout=" "

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.




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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Jul 2017 01:56:59 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Fixed ReleaseNone=>SCM
      Triage StatusNone=>Small Effort
    Fri 12 May 2017 06:34:09 PM UTCtrunkelCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1