tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Should we use _malloc_prefork and _malloc_postfork?

In article <>,
Beverly Schwartz  <> wrote:
>Has anyone had experience using _malloc_prefork and
>_malloc_postfork? Is there any reason why they are not registered in
>pthread_init?  While the Posix specification doesn't require that we
>add these handlers, in practice, they are very useful because there
>is so much non-compliant software out there. (Python is only one
>example; I have found others.)  It's a simple and reasonable change
>that avoids the vast majority of bugs caused by non-compliant programs.

I think we should go one step further than using them, and override
fork() in libpthread so we can do similar things that the FreeBSD
pthread fork does to make sure that it is safer (like blocking signals).

Please file a PR with this.


Home | Main Index | Thread Index | Old Index