From 02851bbeec3dc1bcbcb80f190c3b33950f5b9ed5 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Thu, 12 Aug 2021 18:14:08 -0700 Subject: [PATCH] Bash can start without warnings --- system/src/riju-pty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/src/riju-pty.c b/system/src/riju-pty.c index 254b8c2..402f1f4 100644 --- a/system/src/riju-pty.c +++ b/system/src/riju-pty.c @@ -59,6 +59,8 @@ int main(int argc, char **argv) die("fork failed"); else if (exec_pid == 0) { close(pty_master_fd); + if (setsid() < 0) + die("setsid failed"); int pty_slave_fd = open(pty_slave_name, O_RDWR); if (pty_slave_fd < 0) die("open failed");