X
Xaonon
Or, more likely, it was broken before in some way that wasn't apparent until
I installed 5.8.1. The program in question is a signature generator, which
runs as a daemon and produces random quips via a named pipe. The main loop
looks like this:
while( 1 )
{
-p $options{outfile}
or die "$0: `$options{outfile}' disappeared\n";
sysopen FIFO, $options{outfile}, O_WRONLY
or die "$0: $options{outfile}: $!\n";
print FIFO randsig();
close FIFO or die "$0: $options{outfile}: $!\n";
# Sleep briefly to let the reader see EOF.
select undef, undef, undef, 0.1;
}
Now, though, it seems that the reader doesn't ever see an EOF. For example,
running "cat sig.fifo" spits out signature after signature until I kill the
process, as opposed to just printing one and finishing. I note that running
the program with 5.6.1 still works, but I want a more rigorous solution.
Can anyone identify the problem?
I installed 5.8.1. The program in question is a signature generator, which
runs as a daemon and produces random quips via a named pipe. The main loop
looks like this:
while( 1 )
{
-p $options{outfile}
or die "$0: `$options{outfile}' disappeared\n";
sysopen FIFO, $options{outfile}, O_WRONLY
or die "$0: $options{outfile}: $!\n";
print FIFO randsig();
close FIFO or die "$0: $options{outfile}: $!\n";
# Sleep briefly to let the reader see EOF.
select undef, undef, undef, 0.1;
}
Now, though, it seems that the reader doesn't ever see an EOF. For example,
running "cat sig.fifo" spits out signature after signature until I kill the
process, as opposed to just printing one and finishing. I note that running
the program with 5.6.1 still works, but I want a more rigorous solution.
Can anyone identify the problem?