[Date Prev][Date Next] [Chronological] [Thread] [Top]

Patch: Implement surrogate parent for back-shell (ITS#1815)



Full_Name: Hallvard B. Furuseth
Version: HEAD (ca 2002-05-09)
OS: Linux
URL: http://folk.uio.no/hbf/OpenLDAP/surrogate.txt
Submission from: (NULL) (129.240.186.42)


A surrogate parent is supposed to keep back-shell children from
deadlocking due to resources locked by a threading parent.

Implementation note: The surrogate parent closes all unused file
descriptors, so it logs errors to stderr instead of via Debug() and
uses relloc() instead of ch_realloc().

Also close a file descriptor leak if fork() fails in fork.c.

Maybe this is unimportant, since I can't remember complaints about
back-shell hanging, but here it is if you want it.

I hope there isn't some "standard" way this is meant to be done,
because I did it my way.