aboutsummaryrefslogtreecommitdiffstats
path: root/src/initial_pins.c
diff options
context:
space:
mode:
authorLasse Dalegaard <dalegaard@gmail.com>2021-03-01 15:49:18 +0000
committerKevin O'Connor <kevin@koconnor.net>2021-03-01 12:59:33 -0500
commite0db9f3a6ec5caf619cba2e693be1b155df052f4 (patch)
treef0b80e3a6ba707b967b7f8a06e49fb8277931246 /src/initial_pins.c
parent1b989b81e0be596d6b61599c8bce0d8a21c606ee (diff)
downloadkutter-e0db9f3a6ec5caf619cba2e693be1b155df052f4.tar.gz
kutter-e0db9f3a6ec5caf619cba2e693be1b155df052f4.tar.xz
kutter-e0db9f3a6ec5caf619cba2e693be1b155df052f4.zip
serialhdl: prevent creation of controlling tty
When `serialhdl` opens a terminal device it must prevent the device from becoming the controlling terminal of `klippy`, as such a terminal will send additional messages to the session leader, e.g. a SIGHUP, which would kill `klippy`. See e.g. #3981. pySerial already does this, but for e.g. `klipper_mcu` we were not doing this ourselves. On Linux a process must set `O_NOCTTY` when opening any file that could potentially be a terminal device, to avoid this. Earlier process daemonization tools prevent this from being an issue by double forking, but under `systemd` a process must take steps to avoid opening a controlling terminal. Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/initial_pins.c')
0 files changed, 0 insertions, 0 deletions