chiark / gitweb /
systemd-inhibit: ignore signal interrupt from keyboard (#8569)
authorChristian Hesse <mail@eworm.de>
Wed, 28 Mar 2018 19:58:10 +0000 (21:58 +0200)
committerSven Eden <yamakuzure@gmx.net>
Thu, 28 Jun 2018 07:24:07 +0000 (09:24 +0200)
commit68c47871535923b5580c5e58105f97a062b363dd
tree6633402599a74abad6180392c19666a16da76165
parent504cb982f882169fc0adf9a2151a4331d339056d
systemd-inhibit: ignore signal interrupt from keyboard (#8569)

By default both processes, systemd-inhibit and the forked one, receive
the signals. Pressing Ctrl+C on the keyboard results in SIGINT being
sent to the processes, followed by SIGTERM being sent to the forked
process when systemd-inhibit exits. This can cause trouble when the
forked process does not clean up properly but exit immediately.

Instead make systemd-inhibit ignore SIGINT, leaving it to the forked
process to clean up and exit.

(cherry picked from commit 106f12a08fcacef713438fc055872592399deeed)
src/login/inhibit.c