[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [Bug] dlopen() might cause deadlock



> From: Ulrich Drepper

> > This is overly restrictive.  It is common for
> > the child process to call dup2 and close after
> > fork and before exec.
> 
> If you want to call fork in an MT app something is wrong.  This never
> has and never will be a good idea.  The only alternative to violating
> the rules is to use posix_spawn which allows you to do have dup2 called.
>  But don't try to argue in favor of relaxing the fork-related rules.
> This just shows you have never thought about to implications.

So with a single paragraph you have just outlawed, for example, something
like a multithreaded desktop manager that when you click on icon "x"
spawns process d (and don't tell me this is not a common design, I don't
buy it). 

The async-safe-signal exception clause in fork() is there for a reason.
Makes full sense that you cannot expect to do everything under the sun,
but a minimal of functionality has to be possible.

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own (and my fault)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]