|
|
|
|
|
by xyzzy_plugh
1409 days ago
|
|
How about C? Bash? Perl? Java? Go? Rust? I've done plenty of signal handling in Python and it's extremely straight forward. Like other languages, the runtime takes care of safely propagating information from the signal handler to other execution contexts, which requires being careful in a language like C (it's not hard, but you can't be naive). I wouldn't be surprised if there were bugs in Python, it's a mess generally and I'm not a fan. Postgres queries run as subprocesses. You can send them any signals you want. Postgres tries very hard to be durable, and it handles signals carefully but often to the dismay of the operator who can't force it to stop without SIGKILL. > registering for a signal is arguably non-trivial and incorrectly specified in many places since sigaction() supersedes signal(). This isn't a good argument, no one uses signal(2), I'm not aware of that ever being recommended in recent history and even the docs on my system scream "never use this" quite clearly. Look, if you're not going to read the docs, signal handling will be the least of your concern. Signal behavior is extremely well documented. |
|