Unix Signal Handling

Discussions center on Unix/Linux signals like SIGKILL, SIGTERM, SIGINT, and SIGQUIT, including best practices for process termination, handling interruptions during syscalls, and alternatives like signalfd or PR_SET_PDEATHSIG.

📉 Falling 0.4x DevOps & Infrastructure
3,006
Comments
19
Years Active
5
Top Authors
#7275
Topic ID

Activity Over Time

2008
5
2009
26
2010
35
2011
81
2012
71
2013
76
2014
208
2015
140
2016
241
2017
200
2018
188
2019
183
2020
213
2021
159
2022
244
2023
342
2024
357
2025
228
2026
9

Keywords

CPU catern.com EOF AIX UNIX SIGTTOU SIGABRT SIGHUP CWD SIGTERM signal handler kill signals processes process unix ctrl command caught

Sample Comments

peterwwillis • Jan 9, 2020 • View on HN

I am upset that they're using signal 9 instead of 15.

baudaux • Oct 19, 2023 • View on HN

There are being implemented. There is a limitation about signal handling, it can interrupt a process during a sys call

stvltvs • Oct 23, 2023 • View on HN

Avoiding SIGKILL is probably a good call.

Quarrel • Jun 21, 2025 • View on HN

I'm more worried that there might be lots of devs that can't send a sigint!

vonuebelgarten • Dec 30, 2011 • View on HN

Because your signal handler may get interrupted by another signal.

drzaiusapelord • Mar 31, 2015 • View on HN

Doesn't all sigint? We do sigint for a reason.

omribahumi • Nov 11, 2016 • View on HN

Another signal that can't be caught is SIGSTOP

ad_hominem • Dec 16, 2014 • View on HN

SIGUSR1 is often caught by applications for their own IPC. SIGQUIT would probably be a safer one to send, but that can also be caught and repurposed. Sending other signal types would definitely have to be opt-in to prevent unintended side effects.

eru • Jan 28, 2014 • View on HN

SIGUSER is quite common for that. Or SIGHUP.

amalcon • Sep 28, 2011 • View on HN

Doing this is more-or-less like calling a signal handler directly in a UNIX program: you're not likely to get the result you want.