Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: msys
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='msys' -DCONF_MACHTYPE='x86_64-pc-msys'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DS
Am Dienstag, 27. April 2021, 11:45:44 CEST schrieb Robert Elz:
> Date:Tue, 27 Apr 2021 05:57:40 +
> From:"Beer, Mathis"
> Message-ID: <3024777.xmhlYjkYgV@ka-nl-mbeer>
>
> | Given a background process that has exited before the script got to wait
> | -n:
> |
Date:Tue, 27 Apr 2021 05:57:40 +
From:"Beer, Mathis"
Message-ID: <3024777.xmhlYjkYgV@ka-nl-mbeer>
| Given a background process that has exited before the script got to wait -n:
|
| function foo() { return 1; }
| foo & FOO_PID=$!
|
| function bar() { sl
27 Nisan 2021 Salı tarihinde Beer, Mathis yazdı:
> Given a background process that has exited before the script got to wait
> -n:
>
> function foo() { return 1; }
> foo & FOO_PID=$!
>
> function bar() { sleep 1; }
> bar & BAR_PID=$!
>
> sleep 0.1
> # should exit with 127 since FOO_PID is non-exis
Given a background process that has exited before the script got to wait -n:
function foo() { return 1; }
foo & FOO_PID=$!
function bar() { sleep 1; }
bar & BAR_PID=$!
sleep 0.1
# should exit with 127 since FOO_PID is non-existent now
wait -n $FOO_PID $BAR_PID
Then wait -n will wait on BAR_PID