On Sun, Nov 05, 2000 at 01:48:04AM +0200, Eric Smith wrote:
> 
> Nasty way of effecting this communication is to have each mail message
> saved to a file and do a readdir every time interval.

Ugh.  You're not talking mod_perl here, though, are you?

> Is it possible to have the mod_perl process listen on a socket (or
> something) that procmail may write to?

Not really, Apache won't listen on a Unix domain socket AFAICS.  However,
you *might* be able to write a little daemon that forwards from a
Unix domain socket that procmail could open to a TCP socket.  But then
you could just hang your code in that daemon.  Or you could hack Apache.
Or see if Apache 2.0 has that functionality yet.

Perhaps your best bet is to code a simple perl daemon to listen on a
Unix domain socket (no mod_perl involved).  It's not that hard, see
the perlipc man page and wander around CPAN.

I've been pondering the effects of making a caching front end server
talk to the back end mod_perl server via unix domain sockets, but I think
the cache and the back end servers end up on separate machines so often it
wouldn't be that useful a hack.  And now that mod_backhand supports HTTP/1.1
keep-alive connections to each mod_perl server in the "back end", there's
very little TCP connect/close handshake time to worry about, it seems.

- Barrie

Reply via email to