svscan and multilog with a perl process
Joel Stevenson <[email protected]>
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <p06110456bd54fa483a08@[192.168.0.9]> |
Hi,
I'm having a problem with multilog when it is being invoked by svscan
to receive output from a perl process. There doesn't appear to be
any output recorded at all in the log. The trivial test case is:
/DIR/test/run
-----------------------
#!/bin/sh
exec /DIR/test/foo.pl
#__EOF__
/DIR/test/foo.pl
-----------------------
#!/usr/bin/perl
while (1) {
print localtime()."\n";
sleep (int (rand (2)) + 1);
}
#__EOF__
DIR/test/log/run
-----------------------
#!/bin/sh
exec /usr/local/bin/multilog t /DIR/test/loghere
#__EOF__
when runing svscan in the DIR directory no output from foo.pl is
recorded in the current log within /DIR/test/loghere/current.
If I change /DIR/test/run be a plain shell script which echos the
date to standard out every second or so and run svscan on the
directory the logging works.
Is this perhaps an issue with exec and perl? Perhaps just with perl?
If I rename /DIR/test/foo.pl to /DIR/test/run so that it is directly
inovked instead of via an 'exec' I still don't get any logging.
If I execute the perl file and pipe using the shell to multilog I
also don't see any logging.
I'm stumped at this point; I've been fiddling with this problem off
and on for a while now and just can't seem to get it to work. Any
help or pointers would be most appreciated.
TIA,
Joel