On Wednesday 10 August 2016, Andrei Borzenkov wrote:
On Tue, Aug 9, 2016 at 10:33 PM, Ruediger Meier <sweet_f_a@gmx.de> wrote:
Hi,
I'm debugging why my processes do not terminate gracefully at shutdown and found that openSUSE's systemd setup seems to send SIGHUP to user's processes. This is the output of my test program while "shutdown -h"
2016-08-09 21:05:00.556999 catched SIGNAL 1 (SIGHUP) 2016-08-09 21:05:00.557086 catched SIGNAL 15 (SIGTERM) 2016-08-09 21:05:00.557572 catched SIGNAL 1 (SIGHUP)
On other sysvinit systems I get only SIGTERM _one_ time before it would send the final SIGKILL.
Problem: Many user space programs don't handle SIGHUP. Thus they are using the default sig handler and terminate immediately without any cleanup.
What is the reason why SIGHUP is sent? How to disable it to get the known behavior?
What are "your processes" - processes belonging to your login session or processes belonging to some service you created?
Just any processes I've sent into background manually via ssh or console login. I'm talking about any "usual" processes which are started by "normal" users during uptime. $ pstree -lp systemd(1)─┬─agetty(533) .... ├─sigtest1(2944) ├─sigtest2(2943) .... But thanks for the "session" hint: $ systemctl status 2944 session-56.scope - Session 56 of user rudi Loaded: loaded (/run/systemd/system/session-56.scope; static) Drop-In: /run/systemd/system/session-56.scope.d └─90-After-systemd-logind\x2eservice.conf, 90-After-systemd-user-sessions\x2eservice.conf, 90-Description.conf, 90-KillMode.conf, 90-SendSIGHUP.conf, 90-Slice.conf Active: active (abandoned) since Wed 2016-08-10 10:28:11 CEST; 5min ago CGroup: /user.slice/user-1000.slice/session-56.scope ├─2943 ./sigtest2 └─2944 ./sigtest1 $ cat /run/systemd/system/session-56.scope.d/90-SendSIGHUP.conf [Scope] SendSIGHUP=yes So, where does the "90-SendSIGHUP.conf" comes from? cu, Rudi -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org