Messages in this thread | | | Date | Sat, 09 Apr 2011 01:14:45 +0400 | From | Stas Sergeev <> | Subject | Re: [path][rfc] add PR_DETACH prctl command |
| |
09.04.2011 00:52, Bryan Donlan wrote: > Still, you can workaround this by either: Yes, sure.
> a) Load the vendor library via dlopen() Too much to dlsym(), and by the way, what does this give? I _have to_ init that lib early at bootup, so I don't see how dlopen will help, could you clarify?
> b) Use a separate launcher executable to handle the fork-and-wait Yes, that's certainly possible, except that I was trying the semaphore instead of a signal, as in your example, but its the same.
> Just kill(atoi(getenv("LAUNCHER_PID")), SIGUSR1) to detach. Much > easier than doing some very racy things in the kernel, no? It's > certainly more obvious that this ought to be correct in the face of > races with its parent :) But what races do you mean? Yes, the workaround is a workaround, and it works. And is simpler to implement. :) But what problems do you see with the PR_DETACH approach, except for the bugs in my patch? :) I mean, the fact that daemon() silently loses threads, sounds like a limitation, after all.
| |