From 21f81b81b0d914a17baa08b866c42572a5840152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 2 Oct 2014 14:21:19 +0200 Subject: [PATCH] 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. --- forkpty-aix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/forkpty-aix.c b/forkpty-aix.c index db1c3d9..2cb5169 100644 --- 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)