This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 03/09/2018 05:41 PM, Rich Felker wrote:
"Just use glib" is of course fundamentally unacceptable. But the obvious solution is "just use threads" and I don't see why that's not acceptable. The cost of a thread is miniscule compared to the cost of a child process, and threads performing synchronous waitpid can convert the result into whatever type of notification (poll wakeup, cond var, synchronous handling, etc.) you like. This is clearly the best approach for any application that's not creating at least tens/hundreds of child processes per second; when people refuse to use it in such a situation, it's because of irrational aversion to threads and nothing else.
But this only works for asynchronous signals. It's reasonable for an application to want to catch synchronous signals (SIGBUS when dealing with file mappings, SIGFPE for arithmetic), and there is currently no thread-safe or library-safe way at all to do that.
Thanks, Florian
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |