aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index e4cf46b..a3643fd 100644
--- a/misc.c
+++ b/misc.c
@@ -146,11 +146,12 @@ int fork_exec(struct socket *so, const char *ex, int do_pty)
return 0;
case 0:
+ setsid();
+
/* Set the DISPLAY */
if (do_pty == 2) {
(void)close(master);
#ifdef TIOCSCTTY /* XXXXX */
- (void)setsid();
ioctl(s, TIOCSCTTY, (char *)NULL);
#endif
} else {