diff --git a/README b/README index fddc9ac..95afd82 100644 --- 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 index e97d1a2..b666e33 100644 --- 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; }