Audit setsid(1)
Nothing special, just a small style-fix.
This commit is contained in:
parent
48696d8c95
commit
7afc84396a
2
README
2
README
|
@ -60,7 +60,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
|
||||||
=* rmdir yes none
|
=* rmdir yes none
|
||||||
# sed
|
# sed
|
||||||
seq non-posix none
|
seq non-posix none
|
||||||
=* setsid non-posix none
|
=*| setsid non-posix none
|
||||||
=*| sha1sum non-posix none
|
=*| sha1sum non-posix none
|
||||||
=*| sha256sum non-posix none
|
=*| sha256sum non-posix none
|
||||||
=*| sha512sum non-posix none
|
=*| sha512sum non-posix none
|
||||||
|
|
3
setsid.c
3
setsid.c
|
@ -20,7 +20,7 @@ main(int argc, char *argv[])
|
||||||
usage();
|
usage();
|
||||||
} ARGEND;
|
} ARGEND;
|
||||||
|
|
||||||
if (argc < 1)
|
if (!argc)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
if (getpgrp() == getpid()) {
|
if (getpgrp() == getpid()) {
|
||||||
|
@ -38,5 +38,6 @@ main(int argc, char *argv[])
|
||||||
execvp(argv[0], argv);
|
execvp(argv[0], argv);
|
||||||
savederrno = errno;
|
savederrno = errno;
|
||||||
weprintf("execvp %s:", argv[0]);
|
weprintf("execvp %s:", argv[0]);
|
||||||
|
|
||||||
return (savederrno == ENOENT) ? 127 : 126;
|
return (savederrno == ENOENT) ? 127 : 126;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user