projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e24e886
)
setsid: fix broken -c
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 20 Jun 2016 21:50:26 +0000
(23:50 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 20 Jun 2016 21:50:26 +0000
(23:50 +0200)
This did not work: setsid sh -c 'anything'
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/setsid.c
patch
|
blob
|
history
diff --git
a/miscutils/setsid.c
b/miscutils/setsid.c
index 1b27377b22f92d95431a62e05f141a48c4219063..9bddc2fcf0ba6d69bad108567bcd1a0ce4fbddb8 100644
(file)
--- a/
miscutils/setsid.c
+++ b/
miscutils/setsid.c
@@
-29,7
+29,7
@@
int setsid_main(int argc UNUSED_PARAM, char **argv)
unsigned opt;
opt_complementary = "-1"; /* at least one arg */
- opt = getopt32(argv, "
c");
+ opt = getopt32(argv, "
+c"); /* +: stop on first non-opt */
argv += optind;
/* setsid() is allowed only when we are not a process group leader.