apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Inherited Handles and APR
Date Fri, 13 Jul 2001 20:45:33 GMT
After a respectable lunch at Boudin's, Ryan and I think we have the general answers
to child handles.

The apr_foo_open/create calls need an APR_INHERIT flag bit to mark resources as
inheritable.  This offers two advantages;

  1. the app doesn't need to worry about fork/exec cleanups v.s. inherit bits for
     createprocess() based Win32 (and other non-forks.)

  2. mainline code is more readable, as the user no longer registers their own
     cleanup_for_exec handlers to simply close handles.

The patch, for apr_file_open, follows.  Rbb is working on a similar for Sockets, and
calls that generate 'handles' will need to be reviewed as well...

I obviously have the much larger job of applying the APR_INHERIT flag judiciously
throughout the entire server and removing child cleanups where appropriate ...

Bill

Mime
View raw message