Re: mutilog via fifo
richard lucassen <[email protected]> Sat, 2 Aug 2008 14:40:51 +0200
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Organization | XAQ Systems |
| Message-ID | <[email protected]> |
On Sat, 02 Aug 2008 00:56:49 -0400 [email protected] (Paul Jarc) wrote: > Daryl Tester <[email protected]> wrote: > > The only problem with this method is that the messages that were > > going to stdout and stderr (e.g. from tcpserver) are now going > > elsewhere - depending on how you invoked svscan this might be > > readproctitle, or just dumped into the ether. > > No, those messages would still go where they were going before - to > the log pipe created by svscan. But since multilog is no longer > reading that pipe, it'll eventually fill up and tcpserver will block > when writing to it. To fix that, change the second line to: > exec > /usr/local/elhttp/fifo 2>&1 So, is this an elegant solution to this problem?: cat elhttp/run #!/bin/sh exec > /usr/local/sbin/elhttp/fifo 2>&1 exec /usr/local/bin/setuidgid qftp /usr/local/bin/tcpserver -vDRHl0 -c100 0 8088 /usr/local/bin/elhttp 0 0.0.0.0 0.0.0.0 "/usr/local/sbin/elhttp/fifo" 1 cat elhttp-test/log/run #!/bin/sh exec < /usr/local/sbin/elhttp/fifo exec /usr/local/bin/setuidgid qftplog /usr/local/bin/multilog s1048576 ./main R. -- ___________________________________________________________________ It is better to remain silent and be thought a fool, than to speak aloud and remove all doubt. +------------------------------------------------------------------+ | Richard Lucassen, Utrecht | | Public key and email address: | | http://www.lucassen.org/mail-pubkey.html | +------------------------------------------------------------------+