summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2008-08-27 20:16:06 +0000
committerstefanf <stefanf@FreeBSD.org>2008-08-27 20:16:06 +0000
commit694055a5a742f85060f61e8515d3139783fff94b (patch)
tree1d997b1d604a6de5f5e8648caf947e82aab9a4fa /bin
parent17e49589f8ab1aedd006fcb09c19e1c560f56624 (diff)
downloadFreeBSD-src-694055a5a742f85060f61e8515d3139783fff94b.zip
FreeBSD-src-694055a5a742f85060f61e8515d3139783fff94b.tar.gz
Fix a bug in r177497 which caused the getopts state to be reset when 'set'
was used to set a shell option (and not to change the positional parameters). Submitted by: Martin Kammerhofer
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/options.c b/bin/sh/options.c
index ff5736d..fea95ca 100644
--- a/bin/sh/options.c
+++ b/bin/sh/options.c
@@ -338,6 +338,7 @@ setparam(char **argv)
shellparam.malloc = 1;
shellparam.nparam = nparam;
shellparam.p = newparam;
+ shellparam.reset = 1;
shellparam.optnext = NULL;
}
@@ -405,7 +406,6 @@ setcmd(int argc, char **argv)
if (*argptr != NULL) {
setparam(argptr);
}
- shellparam.reset = 1;
INTON;
return 0;
}
OpenPOWER on IntegriCloud