[ GSOC ] Differences in shell behaviour

Lars Engels lars.engels at 0x20.net
Fri Jun 1 07:43:11 UTC 2012


On Fri, Jun 01, 2012 at 09:38:38AM +0400, Alexander Pyhalov wrote:
> Good morning.
> 
> On 06/01/2012 07:53, Jason Hellenthal wrote:
> >
> >
> > On Thu, May 31, 2012 at 11:21:10PM +0400, Alexander Pronin wrote:
> >> The problem is:
> >> ### sh in 8.3
> >> $ false&  pid=$!
> >> $
> >> [1]   Done (1)                false
> >> $ wait ${pid}
> >> wait: No such job: 4852
> >
> > I don't see this behavior on 8.3-STABLE @r236350 i386
> >   ---
> > Console>  false&  pid=$!
> > Console>  wait ${pid}
> > [1]   Done (1)                false
> > Console>  echo $?
> > 1
> 
> It seems to behave differently, when you issue some additional commands 
> or interact with shell.
> 
> first case (8.3 r234443):
> $ false &pid=$!
> $ wait ${pid}
> [1]   Done (1)                false
> $ echo $?
> 1
> 
> second case (8.3 r234443):
> $ false & pid=$!
> $ # some interaction with shell
> [1]   Done (1)                false
> $ wait ${pid}
> wait: No such job: 59092
> 
> 
> Now, on 9.0-RELEASE
> first case:
> $ false & pid=$!
> $ wait ${pid}
> [1]   Done(1)                 false
> $ echo $?
> 1
> 
> second case:
> $ false & pid=$!
> $ # some activity
> [1]   Done(1)                 false
> $ wait ${pid}
> $ echo $?
> 1
> 
> Do you see the difference ? Which behavior is correct? Can it be a sh bug?
> 

Adding jilles to CC, he worked on sh(1) during the last months.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120601/f0110123/attachment.pgp


More information about the freebsd-ports mailing list