bin/74404: sh(1) does not handle signals to subshells properly and/or $! is broken

Mike Silbersack silby at silby.com
Mon Apr 6 20:40:05 PDT 2009


The following reply was made to PR bin/74404; it has been noted by GNATS.

From: Mike Silbersack <silby at silby.com>
To: Jilles Tjoelker <jilles at stack.nl>
Cc: bug-followup at FreeBSD.org
Subject: Re: bin/74404: sh(1) does not handle signals to subshells properly
 and/or $! is broken
Date: Mon, 6 Apr 2009 22:11:08 -0500 (CDT)

 On Sun, 5 Apr 2009, Jilles Tjoelker wrote:
 
 >> [ sh forks twice for (somecommand) & ]
 >
 > It seems reasonable for sh to fork twice here. You can avoid it by doing
 > { somecommand; } &.
 
 I honestly don't remember how I came up with the script in question, but I 
 suspect that I picked it up from an example bash script.  Based on that, 
 it may be worth making the script function as is.
 
 Mike "Silby" Silbersack


More information about the freebsd-bugs mailing list