httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Rectanus" <brect...@gmail.com>
Subject Re: [users@httpd] LINUX: writing logfiles into named pipe ?
Date Sun, 14 May 2006 15:27:00 GMT
I do this all the time and have no problems with it.  I usually do
this to filter logs and organize them into an archivable structure
with cronolog.

Sounds like your problem is that httpd is blocking because there is no
reader on the pipe.  Make sure whatever is reading from the pipe is
doing so *before* httpd writes to it and does not close the handle or
exit.  Also make sure httpd exits before the reader exits.  If the
reader disapears, then httpd will hang until it comes back (or forever
if not).

Stupid example showing blocking from lack of reader:

# Make named pipe
$ mknod foo p
# Start a reader in background
$ cat foo &
[1] 2000
# Write and reader will echo and then exit
$ echo bar > foo
bar
[1]+  Done                    cat foo
# Attempt to write again and it blocks w/o reader
$ echo bar > foo
# Ctrl+Z to stop, then background the hung writer
$ bg
[1] 2010
$ cat foo
bar
[1]+  Done                    echo bar >foo

-B

On 5/13/06, Harry RĂ¼ter <harry_rueter@gmx.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hallo list,
>
> i was trying to write logs into a named pipe,
> but had i no success (httpd-2.0.54).
>
> httpd is waiting/blocking forever and must be killed ...
>
>
> Any idea ?
>
> Is a patch existing ?
>
> How can i tell the developers allowing to write
> logs into named pipes would be a wonderful feature ?
>
>
> Greets Harry
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
>
> iD8DBQFEZZWh7ttRafA1ej8RAvbnAKCRWOAdGZXjbjZVVFzfYBTFSB0RbgCeIsCK
> j6IvWYoyq1LR/ctOashbP8s=
> =lyzi
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message