Skip to content

Commit ceb8dd4

Browse files
heliocatDuncaen
authored andcommitted
services/agetty-generic: use chpst -P instead of setsid
The setsid program has a surprise gotcha of backgrounding a process if it already happens to be the session leader. This is ok for runit which never sets the service as a session leader but does not work with other supervisors which might. chpst provides the same setsid(2) functionality without also having the gotcha. Be aware that chpst has issues around gidlist squashing when using the -u or -U options without explicit passing. This behavior is not triggered in this case since chpst is being run as root and not being asked to drop privileges.
1 parent 13b21ac commit ceb8dd4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • services/agetty-generic

services/agetty-generic/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ elif [ -x /sbin/agetty -o -x /bin/agetty ]; then
1212
GETTY=agetty
1313
fi
1414

15-
exec setsid ${GETTY} ${GETTY_ARGS} \
15+
exec chpst -P ${GETTY} ${GETTY_ARGS} \
1616
"${tty}" "${BAUD_RATE}" "${TERM_NAME}"

0 commit comments

Comments
 (0)