Do not return 0 on error for setsid(1)
This commit is contained in:
parent
bf17657544
commit
ac033652fe
4
setsid.c
4
setsid.c
@ -1,5 +1,6 @@
|
||||
/* (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
|
||||
* See LICENSE file for license details. */
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user