From dcbf42230f1ed27451d428ac3e6e97c85202d7c7 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 28 Mar 2026 12:07:36 +0000 Subject: s6-setsid bugfix: only check ctty when actually calling tcsetpgrp --- src/daemontools-extras/s6-setsid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/daemontools-extras') diff --git a/src/daemontools-extras/s6-setsid.c b/src/daemontools-extras/s6-setsid.c index 21662d0..144bbb6 100644 --- a/src/daemontools-extras/s6-setsid.c +++ b/src/daemontools-extras/s6-setsid.c @@ -60,7 +60,7 @@ int main (int argc, char const *const *argv) { if (!uint0_scan(wgola[GOLA_CTTY], &ctty)) dieusage() ; } - else if (wgolb & (GOLB_PGRP | GOLB_FG)) + else if (wgolb & GOLB_PGRP & GOLB_FG) { int fd = openc_read("/dev/tty") ; if (fd == -1) strerr_diefu2sys(111, "open ", "/dev/tty") ; -- cgit v1.3.1