Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What does that do?


It's a way to send a SIGALRM signal to your running process [1] using the alarm() syscall. You can also catch the signal [2] and act upon. For example it's used by "timeout" [3].

[1] https://dokk.org/manpages/alarm.2#DESCRIPTION [2] https://dokk.org/manpages/sigaction.2#DESCRIPTION [3] https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tim...


Probably sends a SIGALRM signal in 10 seconds.

https://linux.die.net/man/2/alarm


Which, if you haven't taken precautions to make it otherwise, will shoot your process in the head.

"Dear operating system, please shoot me in the head in ten seconds if I haven't already finished" is a really useful thing to ask for sometimes.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: