🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.linux.development.apps
2 messages
2 total messages Started by Rod Tolosa Wed, 05 Aug 1998 00:00
Can a PIPE input be FLUSHED?
#95
Author: Rod Tolosa
Date: Wed, 05 Aug 1998 00:00
9 lines
1045 bytes
I'm reading from a pipe file that I created using mknod -p.

What I'd like to do is when I open up the file or at certain
times, be able to FLUSH any input on this pipe.

I checked ioctl calls, socket calls, include files, and the pipe.c
source code. I could not find anything.

Does anyone know what command I can use for this?
Re: Can a PIPE input be FLUSHED?
#96
Author: H. Peter Anvin
Date: Thu, 06 Aug 1998 00:00
25 lines
1898 bytes
Followup to:  <35C8C4A1.93FCECDC@dvsystems.com>
By author:    Rod Tolosa <rod@dvsystems.com>
In newsgroup: comp.os.linux.development.system
> 
 > I'm reading from a pipe file that I created using mknod -p.
 > 
 > What I'd like to do is when I open up the file or at certain
 > times, be able to FLUSH any input on this pipe.
 > 
 > I checked ioctl calls, socket calls, include files, and the pipe.c
 > source code. I could not find anything.
 > 
 > Does anyone know what command I can use for this?
 >

 open() it with O_NONBLOCK set and keep reading until you get EAGAIN.
 Then the pipe is empty.

	-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bah�'� -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Mis�rables
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads