Bug 1308450
Summary: | Allow parent processes to terminate graciously after calling shutdown -r now/reboot/init 6 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Tomáš Kašpárek <tkasparek> |
Component: | systemd | Assignee: | systemd-maint |
Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.2 | CC: | duge, lnykryn, systemd-maint-list |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-02-15 12:47:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1289485 |
Description
Tomáš Kašpárek
2016-02-15 09:26:07 UTC
Well, your reproducer should not work anywhere because: 1) Init will send you sigterm immediately which will kill your script. 2) Termination of login process will end up with sighup, which will kill your script. If you try to block those signals: [root@localhost ~]# cat test.sh #!/bin/bash logger "XXXXX-my pid: $$" trap "echo nope" SIGTERM SIGINT reboot & sleep 2 echo whoohooo > /root/out [root@localhost ~]# nohup ./test.sh The /root/out will be created. I guess it worked for you on rhel6 only because the shutdown was pretty slow there. *** Bug 1274433 has been marked as a duplicate of this bug. *** |