httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lee Lester" <...@unico.com.au>
Subject What is the trick to reliable piped logging?
Date Tue, 18 Dec 2001 00:55:40 GMT
I am running apache-ssl Apache/1.3.19 Ben-SSL/1.44 (Unix) and 
have set up the error log to be piped into a perl program (called 
a_iface.pl which waits for input from STDIN and sends it to another 
process via a TCP socket). Occasionally the perl program receives 
an EOF from Apache and dies, but no new process is restarted. I've 
tried to test it by starting Apache, then using ps to find a_iface.pl 
and killing it. I get something like:

    root  3328  3327  0 11:37:37 ?        0:00 /bin/sh -c  
/home/lam/bin/a_iface.pl 
    root  3324     1  1 11:37:34 pts/3    0:00 perl 
/home/lam/bin/a_iface.pl
    root  3329  3328  1 11:37:37 ?        0:00 perl 
/home/lam/bin/a_iface.pl

If I kill the two perl processes, all die and Apache continues on 
without doing any more logging as far as I can tell. No new 
processes are created.

What do I have to do to get the "reliable" piped logging? I've read 
what documentation I can find. It mentions restarts occur only if the 
program crashes - how does Apache perceive a crash? Does it have 
to send some sort of signal to its parent? Does my program have to 
exit with a particular code? I've made it exit with a non-zero code, 
but it doesn't make any difference. The only way I seem to be able 
to get new processes is to restart Apache myself.




Lee Lester
UNICO Computer Systems P/L 3 Bowen Cres Melbourne Vic 3004 Australia
Tel +61 3 9866 5688
lee@unico.com.au
"Pretty women walking with gorillas down my street"

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message