apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <s...@stsp.name>
Subject Re: apr_proc_create {detached} pipes?
Date Sun, 15 Apr 2012 08:50:07 GMT
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. */

Mime
View raw message