|
|
|
|
|
by kelnos
1286 days ago
|
|
Forking is one of those things that is a super elegant solution when things are simple, but breaks down when things become complicated. Multithreaded app? Fork is now a liability, and is only useful if the only (more or less) thing you do in the child is exec. Might as well only have Windows-style CreateProcess at that point. For single-threaded programs, sure, fork is fine and gives you more flexibility than a CreateProcess-type API. Asynchronous signals have a lot of the same problems, but those problems are also present in single-threaded programs. Quite a few APIs have been added over time to try to make working with async signals easier and safer, but all of them add their own new gotchas. |
|
Isn't this referring to uses beyond what async signals are good for, or are you saying that async signals should just not exist in favor of something else? It's not like they're meant to be the only IPC mechanism, but they're good as a standard way to inform a process of certain things while having default handlers.
EDIT: Nevermind.