From eaa90b34e3641f6a30a3c951f6c67215383f3c0c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 28 Mar 2026 16:20:12 +0000 Subject: Booleans are hard --- 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 144bbb6..7a5888c 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) == GOLB_PGRP | GOLB_FG) { int fd = openc_read("/dev/tty") ; if (fd == -1) strerr_diefu2sys(111, "open ", "/dev/tty") ; -- cgit v1.3.1