svn commit: r252617 - in stable/9: bin/sh tools/regression/bin/sh/builtins
Jilles Tjoelker
jilles at FreeBSD.org
Wed Jul 3 21:56:27 UTC 2013
Author: jilles
Date: Wed Jul 3 21:56:25 2013
New Revision: 252617
URL: http://svnweb.freebsd.org/changeset/base/252617
Log:
MFC r248349: sh: Recognize "--" and explicitly reject options in wait
builtin.
If syntactically invalid job identifiers are to be taken as jobs that exited
with status 127, this should not apply to options, so that we can add
options later if need be.
Added:
stable/9/tools/regression/bin/sh/builtins/wait6.0
- copied unchanged from r248349, head/tools/regression/bin/sh/builtins/wait6.0
stable/9/tools/regression/bin/sh/builtins/wait7.0
- copied unchanged from r248349, head/tools/regression/bin/sh/builtins/wait7.0
Modified:
stable/9/bin/sh/jobs.c
Directory Properties:
stable/9/bin/sh/ (props changed)
stable/9/tools/regression/bin/sh/ (props changed)
Modified: stable/9/bin/sh/jobs.c
==============================================================================
--- stable/9/bin/sh/jobs.c Wed Jul 3 21:53:54 2013 (r252616)
+++ stable/9/bin/sh/jobs.c Wed Jul 3 21:56:25 2013 (r252617)
@@ -459,14 +459,15 @@ freejob(struct job *jp)
int
-waitcmd(int argc, char **argv)
+waitcmd(int argc __unused, char **argv __unused)
{
struct job *job;
int status, retval;
struct job *jp;
- if (argc > 1) {
- job = getjob(argv[1]);
+ nextopt("");
+ if (*argptr != NULL) {
+ job = getjob(*argptr);
} else {
job = NULL;
}
Copied: stable/9/tools/regression/bin/sh/builtins/wait6.0 (from r248349, head/tools/regression/bin/sh/builtins/wait6.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/tools/regression/bin/sh/builtins/wait6.0 Wed Jul 3 21:56:25 2013 (r252617, copy of r248349, head/tools/regression/bin/sh/builtins/wait6.0)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+wait --
Copied: stable/9/tools/regression/bin/sh/builtins/wait7.0 (from r248349, head/tools/regression/bin/sh/builtins/wait7.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/tools/regression/bin/sh/builtins/wait7.0 Wed Jul 3 21:56:25 2013 (r252617, copy of r248349, head/tools/regression/bin/sh/builtins/wait7.0)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+: &
+wait -- $!
More information about the svn-src-stable-9
mailing list