Live data from Hacker News

Fixing Ctrl+C in Rust terminal apps: Child process management

fiveonefour.com

61–62 of 62 posts

Re: Fixing Ctrl+C in Rust terminal apps: Child process management

#61
post #52
post #37

Earlier quoted context omitted.

When you use ctrl+c, you are not killing the program, you are sending it a SIGTERM signal which essentially means « could you please stop yourself ? » so the program have a chance to clean things before exiting. kill -9 is sending a SIGKILL signal which, well, kills the program immediately.

SIGINT, not SIGTERM.

You are right ! Thank you !

Re: Fixing Ctrl+C in Rust terminal apps: Child process management

#62
post #37

Earlier quoted context omitted.

When you use ctrl+c, you are not killing the program, you are sending it a SIGTERM signal which essentially means « could you please stop yourself ? » so the program have a chance to clean things before exiting. kill -9 is sending a SIGKILL signal which, well, kills the program immediately.

ctrl-c sends SIGINT.

You are right ! Thank you !
Post reply on HN