[Date Prev][Date Next] [Chronological] [Thread] [Top]

[rtl] clearing a fifo




Hi everybody,

I wrote a small rtl-application to collect data from an ESR-spectrometer
and write it to a fifo (replacing an ugly old OS-9 Box).
However, i have to go shure that the fifo is empty before starting a
measurement. 

What would be the best way to clear a fifo ?  
Is it OK to destroy it and immediately create it again ?

Some time ago there was a discussion in this list about writing 
an ioctl call to get the number of bytes waiting in a fifo.
Has anybody actually done that ?

Thanks 
		Markus


--------------------------------------------------
Markus Weiss
Experimentalphysik II
Universitaetsstrasse 30
95440 Bayreuth
Germany

Tel. 0049 921 55 2602          Fax  0049 921 55 2621

email markus.weiss@uni-bayreuth.de
Homepage http://btp2x1.phy.uni-bayreuth.de/~markusw/
--------------------------------------------------

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu