]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
setsid: add "+" to getopt_long()
authorHarald Hoyer <harald@redhat.com>
Thu, 9 Feb 2012 13:46:26 +0000 (14:46 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 9 Feb 2012 14:33:33 +0000 (15:33 +0100)
otherwise setsid wants to interpret <program> arguments

$ setsid sh -i
setsid: invalid option -- 'i'

Usage:
 setsid [options] <program> [arguments ...]

Signed-off-by: Harald Hoyer <harald@redhat.com>
sys-utils/setsid.c

index 268871a8bd494addf2c47d37c44d51b3fc36c811..efd20e6948e056607b365517f5b3385723117a3d 100644 (file)
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
 
-       while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1)
+       while ((ch = getopt_long(argc, argv, "+Vh", longopts, NULL)) != -1)
                switch (ch) {
                case 'V':
                        printf(UTIL_LINUX_VERSION);