sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 7afc84396aa66268b6c7762958343c194cd2b052
parent 48696d8c955db9d0621812aca7ef5caac727da31
Author: FRIGN <dev@frign.de>
Date:   Mon,  2 Mar 2015 00:20:35 +0100

Audit setsid(1)

Nothing special, just a small style-fix.

Diffstat:
MREADME | 2+-
Msetsid.c | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/README b/README @@ -60,7 +60,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support, =* rmdir yes none # sed seq non-posix none -=* setsid non-posix none +=*| setsid non-posix none =*| sha1sum non-posix none =*| sha256sum non-posix none =*| sha512sum non-posix none diff --git a/setsid.c b/setsid.c @@ -20,7 +20,7 @@ main(int argc, char *argv[]) usage(); } ARGEND; - if (argc < 1) + if (!argc) usage(); if (getpgrp() == getpid()) { @@ -38,5 +38,6 @@ main(int argc, char *argv[]) execvp(argv[0], argv); savederrno = errno; weprintf("execvp %s:", argv[0]); + return (savederrno == ENOENT) ? 127 : 126; }