perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Förtsch <torsten.foert...@gmx.net>
Subject Re: svn commit: r935519 - in /perl/modperl/trunk: t/response/TestAPR/socket.pm xs/APR/Socket/APR__Socket.h xs/maps/apr_functions.map xs/tables/current/ModPerl/FunctionTable.pm
Date Tue, 20 Apr 2010 08:11:36 GMT
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-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message