[syslog-ng]OpenBSD named pipe
Tue, 18 Nov 2003 10:08:39 +0100
On Mon, Nov 17, 2003 at 06:20:14PM -0700, Bobby Johnson wrote:
> I'm new to the list, hope this hasn't been covered before. I'm having some problems with syslog-ng, a named pipe and a shell script. I've created a destination in syslog-ng.conf that points to a pipe. In short the shell script looks like this.
> while read -r line; do
> sort input and output to file
> done < named.pipe
> Almost no matter what I do the script will sit outside the while loop not
> reading anything as things are input into the pipe. If i echo "anything"
> > named.pipe the shell script will run through all or most(not absolutly
> sure on this) of the input and then exit. I have this same setup on a
> FreeBSD computer and it works great, moved it to OpenBSD and it doesn't.
> If I do a tail -f on the pipe while my script is running then exit the
> tail the script works properly. I have tried a few different versions of
> syslog-ng and libol currently I have 1.6.0rc4 and 0.3.11. I have tried
> bourne, bash and ksh. Please help.
The script probably exits because of an EOF read from named.pipe, at least
this is the case when you echo something into the named pipe.
syslog-ng should never close the pipe though, so it should correctly send
messages. Maybe you should try to strace|ktrace|truss the shell script to see
what it exactly does.
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1