|
|
Subscribe / Log in / New account

Replace signals!

Replace signals!

Posted Jan 10, 2022 19:25 UTC (Mon) by NYKevin (subscriber, #129325)
In reply to: Replace signals! by ibukanov
Parent article: VSTATUS, with or without SIGINFO

To be fair, that exact same problem applies to pselect, which is POSIX-standardized and supposedly the Right Way to do this.

I'm not really a fan of libraries randomly forking off temporary processes without the application code's knowledge or consent, to be honest. Sure, if a library is specifically designed to do something like implement a process pool, I suppose it's unavoidable, but if you're just forking off a process because you can, then maybe don't do that.


to post comments

Replace signals!

Posted Jan 11, 2022 11:23 UTC (Tue) by ibukanov (subscriber, #3942) [Link]

With various sandboxing forking an extrenal process or even just executing another copy of the application becomes a common practice.

As for pselect if one writes to a pipe in the signal handler, then one does not need that. I wish that somebody would come up with a flag or something not to keep signals blocked across exec similarly to noexec flags to file descriptors, but I guess that writing to a pipe from a signal handler is so common knowledge that nobody bothered.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds