in reply to How to clear named pipe to just have one line
I don't think it's possible; if you read from a (named) pipe, its content is gone. So you can't read to check how much is in there.
Usually you don't need it either, since named pipes are buffered, and once the buffer is full, writing to it blocks. And, more to the point, you shouldn't even care how much is in the pipe; pipes are there to abstract that away.
What problem are you actually trying to solve? It could be an XY Problem.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to clear named pipe to just have one line
by techman2006 (Beadle) on Feb 08, 2014 at 13:22 UTC | |
by moritz (Cardinal) on Feb 08, 2014 at 13:29 UTC | |
by techman2006 (Beadle) on Feb 08, 2014 at 13:54 UTC | |
by moritz (Cardinal) on Feb 09, 2014 at 12:46 UTC |
In Section
Seekers of Perl Wisdom