Skip to content

fix(asus-shutdown): exit cleanly on SIGTERM#143

Open
scardracs wants to merge 1 commit into
OpenGamingCollective:mainfrom
scardracs:fix-sigterm-hang
Open

fix(asus-shutdown): exit cleanly on SIGTERM#143
scardracs wants to merge 1 commit into
OpenGamingCollective:mainfrom
scardracs:fix-sigterm-hang

Conversation

@scardracs

Copy link
Copy Markdown
Contributor

When asus-shutdown receives a SIGTERM outside of system shutdown (e.g. during manual service management or package update restarts), it ignored the signal and looped indefinitely waiting for logind's PrepareForShutdown signal. Combined with SendSIGKILL=no in the systemd service file, this caused commands like systemctl stop/restart asus-shutdown to hang indefinitely.

This patch makes asus-shutdown break the select loop and exit cleanly upon receiving SIGTERM. Since settings application is run synchronously within the event branch, SIGTERM will not interrupt an ongoing GPU firmware write.

Closes: #140
Signed-off-by: Marco Scardovi scardracs@disroot.org

When asus-shutdown receives a SIGTERM outside of system shutdown (e.g. during manual service management or package update restarts), it ignored the signal and looped indefinitely waiting for logind's PrepareForShutdown signal. Combined with SendSIGKILL=no in the systemd service file, this caused commands like systemctl stop/restart asus-shutdown to hang indefinitely.

This patch makes asus-shutdown break the select loop and exit cleanly upon receiving SIGTERM. Since settings application is run synchronously within the event branch, SIGTERM will not interrupt an ongoing GPU firmware write.

Closes: OpenGamingCollective#140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Yay wants to restart asusd, but that depends on asus-shutdown, which in turn ignores SIGTERM

1 participant