Eric Lucas on Fri, 11 Apr 2003 09:23:16 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Linux FIFOs


Martin:

I, too, have a script (perl natch') that rotates through a list of
signature quotes.  It's not on this computer but IIRC I had to put
a "sleep 1" after the script writes a signature to the FIFO.  
Otherwise, I'd get a flood of signatures out of the FIFO.  
Now, if I issue a "cat .signature" I get a single signature.  If I 
issue a "cat .signature; cat .signature" then I get two signatures 
one second apart.  

I figured I would not be interactively creating more than email per 
second :-)

Although I don't do it, you might benefit by writing an EOF character
after your signature.  That would ensure the reading process would 
stop reading.  Come to think of it, I don't know why I don't write
an EOF in my code... hummmmmmm.

HTH.

Eric

Quoting "Michael F. Robbins" <mike@gamerack.com>:

> On Thu, 2003-04-10 at 22:47, Martin DiViaio wrote:
> > I have a signature rotation script that creates a FIFO to output to. I 
> > then just point pine to the FIFO filename. This doesn't seem to want to 
> > work as it use to.
> 
> I'm sure you've asked yourself already, but what changed?  New version
> of pine/your scripting language/kernel?
> 
> > and it would just start dumping sigs out until I CTRL-C'd the tail. It
> > doesn't do this anymore. It reads the FIFO the first time then just hangs. 
> 
> > The write program makes several more dumps to the FIFO then also hangs.  
> > If I kill the tail at that point, the write program dies with a broken
> > pipe error.
> 
> "man 4 fifo" might provide some insight.  Also, make sure that you
> aren't being thwarted by FIFO buffering.  I imagine that this will be
> specific to the language that you are using.  (When I did some FIFO work
> in C++ I had to be careful to keep flushing the stream after every
> write.)
> 
> To make sure the kernel FIFO behavior is sane, try it manually.  Make a
> FIFO file, cat > thefifo on one virtual console, and  tail -f thefifo
> (or run pine) on another VC.
> 
> Michael F. Robbins
> mike@gamerack.com
> 
> _________________________________________________________________________
> Philadelphia Linux Users Group        --       http://www.phillylinux.org
> Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug
> 
> 
> 


-- 
Eric Lucas
----------
_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug