forked from github/abduco
Make setsid(2) failure non fatal
The specified error EPERM can only occur if the process is already a session leader in which case we do not care.
This commit is contained in:
parent
9e6490da33
commit
21f81b81b0
|
|
@ -50,8 +50,7 @@ pid_t forkpty(int *master, char *name, struct termios *tio, struct winsize *ws)
|
|||
close(fd);
|
||||
}
|
||||
|
||||
if (setsid() < 0)
|
||||
return -1;
|
||||
setsid();
|
||||
|
||||
fd = open(_PATH_TTY, O_RDWR|O_NOCTTY);
|
||||
if (fd >= 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue