mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
setsid: fix broken -c
This did not work: setsid sh -c 'anything' Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
e24e88697a
commit
7cf45ae10e
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user