Re: single instance of multilog for multiple processes
Richard Lucassen <[email protected]> Mon, 21 Sep 2009 10:03:26 +0200
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Organization | XAQ Systems |
| Message-ID | <[email protected]> |
On Mon, 21 Sep 2009 09:16:12 +0930 Daryl Tester <[email protected]> wrote: > (* Reply to /dev/null'd *) > > (* Also have severe head cold - disinfect screen after reading *) :-) > > I'd like to have multiple independent processes log to 1 multilog. I > > think the following solution using a fifo is a good idea: > > > > $ cat run > > > > #!/bin/sh > > while true; do > > /usr/local/bin/setuidgid loguser /usr/local/bin/multilog t \ > > /var/log/multilog > > done < /usr/local/multilog/fifo > > If you're using this as a run script (inferred by the "cat run") > then supervise will be sending signals to the shell, not multilog > (and then the shell with do with it what it damn well pleases, > which may include not passing it on to its child processes). > > As supervise handles the reinvocation of multilog for you, a > simpler scheme might be: > > #!/bin/sh > > exec < /usr/local/multilog/fifo /usr/local/bin/setuidgid loguser \ > /usr/local/bin/multilog t /var/log/multilog Yep. The exec < fifo is better. Thnx! For the rest: see reply to Paul. -- ___________________________________________________________________ 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 | +------------------------------------------------------------------+