diff options
author | Stefan Farfeleder <stefanf@FreeBSD.org> | 2008-08-27 20:16:06 +0000 |
---|---|---|
committer | Stefan Farfeleder <stefanf@FreeBSD.org> | 2008-08-27 20:16:06 +0000 |
commit | 9144fae127d648fcb3c7ff88cd298d319ccd80cb (patch) | |
tree | 1d997b1d604a6de5f5e8648caf947e82aab9a4fa /bin | |
parent | ceef66c0e335efd9d9e33a024c6c91c6d7a4beb0 (diff) | |
download | src-9144fae127d648fcb3c7ff88cd298d319ccd80cb.tar.gz src-9144fae127d648fcb3c7ff88cd298d319ccd80cb.zip |
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
Notes
Notes:
svn path=/head/; revision=182300
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/options.c b/bin/sh/options.c index ff5736d31b94..fea95ca28c68 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; } |