diff --git a/setsid.c b/setsid.c index 796f8d7..2e17540 100644 --- a/setsid.c +++ b/setsid.c @@ -1,5 +1,6 @@ /* (C)opyright MMVI Anselm R. Garbe * See LICENSE file for license details. */ +#include #include #include #include @@ -37,6 +38,5 @@ main(int argc, char *argv[]) eprintf("setsid:"); execvp(argv[0], argv); eprintf("execvp:"); - /* NOTREACHED */ - return 0; + return (errno == ENOENT) ? 127 : 126; }