From: Sami Kerola Date: Sun, 13 Mar 2016 10:31:44 +0000 (+0000) Subject: setsid: fix argument count bug X-Git-Tag: v2.28-rc2~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aeb9298d3e7088877bda7a7cf3634c4b52a3b128;p=thirdparty%2Futil-linux.git setsid: fix argument count bug The below demonstrates what happen before this change. $ setsid --wait setsid: child 3252 did not exit normally: Success Signed-off-by: Sami Kerola --- diff --git a/sys-utils/setsid.c b/sys-utils/setsid.c index adc34ecb38..bb089df21e 100644 --- a/sys-utils/setsid.c +++ b/sys-utils/setsid.c @@ -83,7 +83,7 @@ int main(int argc, char **argv) usage(stderr); } - if (argc < 2) + if (argc - optind < 1) usage(stderr); if (getpgrp() == getpid()) {