Re: [users@httpd] LINUX: writing logfiles into named pipe ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux