On Monday 19 April 2010 20:21:15 Philippe M. Chiasson wrote: > > make the UNIX-level file descriptor of an APR::Socket available > > I am wondering what the usage for this would/could be?
Passing off the descriptor to another process to handle long running stuff while freeing the apache worker. See http://foertsch.name/ModPerl-Tricks/req-hand-over.shtml > Also, this is introducing a non-portable API, something APR tries really > hard to avoid. > But APR has these interfaces. Perhaps it should better be named fileno? > > + > > +static MP_INLINE int mpxs_APR__Socket_sock_get(pTHX_ apr_socket_t *sock) > > +{ > > +#ifdef WIN32 > > + return -1; /* not implemented */ > > +#else > > + apr_os_sock_t s; > > + apr_os_sock_get(&s, sock); > > + return s; > > +#endif > > +} > > Will this work on *all* non WIN32 platforms ? > This is apr shipped with httpd-2.2.14: $ grep apr_os_sock_t apr_portable.h typedef SOCKET apr_os_sock_t; typedef int apr_os_sock_t; typedef int apr_os_sock_t; typedef int apr_os_sock_t; typedef int apr_os_sock_t; /**< native dir */ The first result is windows. So, as long as no other systems are added it should work. Torsten Förtsch -- Need professional modperl support? Hire me! (http://foertsch.name) Like fantasy? http://kabatinte.net --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org For additional commands, e-mail: dev-h...@perl.apache.org