diff options
author | jilles <jilles@FreeBSD.org> | 2013-06-05 19:40:52 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-06-05 19:40:52 +0000 |
commit | 34ac6a12ea10118be8a1ce462ed7964d50d7ac63 (patch) | |
tree | c2bae67da1d59d1debe2e47243f65cff71574f84 /tools/regression | |
parent | dbbdb077d82c797a0eda74194fcf16f3264030ab (diff) | |
download | FreeBSD-src-34ac6a12ea10118be8a1ce462ed7964d50d7ac63.zip FreeBSD-src-34ac6a12ea10118be8a1ce462ed7964d50d7ac63.tar.gz |
sh: Return status 127 for unknown jobs in wait builtin.
This is required by POSIX, at least for pids that are not known child
processes.
Other problems with job specifications still cause wait to abort with
exit status 2.
PR: 176916
Diffstat (limited to 'tools/regression')
-rw-r--r-- | tools/regression/bin/sh/builtins/wait10.0 | 5 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/wait9.127 | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/builtins/wait10.0 b/tools/regression/bin/sh/builtins/wait10.0 new file mode 100644 index 0000000..864fc78 --- /dev/null +++ b/tools/regression/bin/sh/builtins/wait10.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ +# Init cannot be a child of the shell. +exit 49 & p49=$! +wait 1 "$p49" +[ "$?" = 49 ] diff --git a/tools/regression/bin/sh/builtins/wait9.127 b/tools/regression/bin/sh/builtins/wait9.127 new file mode 100644 index 0000000..661f275 --- /dev/null +++ b/tools/regression/bin/sh/builtins/wait9.127 @@ -0,0 +1,3 @@ +# $FreeBSD$ +# Init cannot be a child of the shell. +wait 1 |