On Thu, Apr 12, 2012 at 10:37:13PM -0500, William A. Rowe Jr. wrote: > Has anyone else ever encountered an opportunity to detach a process, > which you would still enjoy stdio channels to communicate?
Yes, this is done in Subversion to run hook scripts. See svn_io_start_cmd3() in: https://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_subr/io.c > First I actually have bumped into this, but we didn't seem to leave > much in the way of an apr_proc_detach that avoids shuttering stdio > handles that were *just configured* through the procattr. Seems > sort of strange to me, because the docs don't make this clear. Not sure if this is related but the above mentioned function contains this comment: ### Unfortunately each of these apr functions creates a pipe and then overwrites the pipe file descriptor with the descriptor we pass in. The pipes can then never be closed. This is an APR bug. */
