abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 21f81b81b0d914a17baa08b866c42572a5840152
parent 9e6490da33cf74a043e214a3dc10bf620f3f1725
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu,  2 Oct 2014 14:21:19 +0200

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.

Diffstat:
forkpty-aix.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/forkpty-aix.c b/forkpty-aix.c @@ -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)