bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nonsensical error message when backgrounding invocation of wait buil


From: Chet Ramey
Subject: Re: nonsensical error message when backgrounding invocation of wait builtin
Date: Wed, 30 Dec 2009 23:44:50 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

On 12/30/09 9:29 PM, Steve Newcomb wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
> -DSHELL -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include
> -I../bash/lib   -g -O2 -Wall
> uname output: Linux zorba 2.6.28-16-generic #57-Ubuntu SMP Wed Nov 11
> 09:49:32 UTC 2009 x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
> 
> Bash Version: 3.2
> Patch Level: 48
> Release Status: release
> 
> Description:
>       It probably never makes sense to background the "wait" builtin,
> but if one makes this error, the
>    resulting error message is nonsensical and confusing:
> 
>    wait: pid nnnnn is not a child of this shell ## (where nnnnn is the pid)

It's not really nonsense.  The ampersand causes wait to be executed in a
subshell environment.  That subshell, since it's a separate process,
doesn't have any children, and certainly can't wait for any.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]