Correct checking of setsid() return value (from bvs@bitblocks.com).
This commit is contained in:
parent
9948c39839
commit
3558cc99e4
|
@ -280,7 +280,7 @@ main(argc, argv)
|
|||
#ifdef POSIX
|
||||
if (fork() > 0)
|
||||
exit(0);
|
||||
if (setsid() != 0)
|
||||
if (setsid() < 0)
|
||||
perror("setsid");
|
||||
#else
|
||||
if ((fd = open("/dev/tty", O_RDONLY, 0)) >= 0) {
|
||||
|
|
Loading…
Reference in New Issue