aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-03-28 12:07:36 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-03-28 12:07:36 +0000
commitdcbf42230f1ed27451d428ac3e6e97c85202d7c7 (patch)
treea7b6362531a134f1a10e01c2bec29584786c6422
parente296c0405b813f4d19ae7efaf6eb1b4117b1e333 (diff)
downloads6-dcbf42230f1ed27451d428ac3e6e97c85202d7c7.tar.gz
s6-setsid bugfix: only check ctty when actually calling tcsetpgrp
-rw-r--r--AUTHORS1
-rw-r--r--CONTRIBUTING2
-rw-r--r--src/daemontools-extras/s6-setsid.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 2bbbc71..a371083 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -45,3 +45,4 @@ Thanks to:
Earl Chew <earl_chew@yahoo.com>
Saj Goonatilleke <saj@discourse.org>
Hoël Bézier <hoelbezier@riseup.net>
+ Josiah Frentsos <jfrent@tilde.team>
diff --git a/CONTRIBUTING b/CONTRIBUTING
index 3173998..bc10b3c 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -10,7 +10,7 @@
* I, the contributor, am the copyright owner of these changes
* I submit these changes according to the project's license
-with no additionam requirements
+with no additional requirements
* I understand these changes in full and will be able to respond
to review comments.
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") ;