[PATCH] setsid: don't parse options which are meant for PROG
Patrick Oppenlander
pattyo.lists at gmail.com
Mon May 9 02:55:06 UTC 2016
Hi,
it looks like setsid wasn't parsing options correctly as it was trying
to understand arguments meant for the new program.
Patrick
---8<---
'setsid ls -l' should pass the -l argument to ls rather than saying
'unrecognized option l'.
---
miscutils/setsid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/miscutils/setsid.c b/miscutils/setsid.c
index 1b27377..a732952 100644
--- 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");
argv += optind;
/* setsid() is allowed only when we are not a process group leader.
--
2.7.4
More information about the busybox
mailing list