summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libutil/login_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/login_tty.c b/lib/libutil/login_tty.c
index a14e244e45aa..92dc87fe710c 100644
--- a/lib/libutil/login_tty.c
+++ b/lib/libutil/login_tty.c
@@ -50,7 +50,7 @@ login_tty(int fd)
s = setsid();
if (s == -1)
- return (-1);
+ s = getsid(0);
if (tcsetsid(fd, s) == -1)
return (-1);
(void) dup2(fd, 0);