Article View: comp.os.linux.development.apps
Article #96Re: Can a PIPE input be FLUSHED?
From: H. Peter Anvin
Date: Thu, 06 Aug 1998 00:00
Date: Thu, 06 Aug 1998 00:00
25 lines
1898 bytes
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
Technical Details
Message-ID:
<6qbpi6$ikq$1@palladium.transmeta.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35C8C4A1.93FCECDC@dvsystems.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f5392,325850ca8fa5fe66 X-Google-Attributes: gidf5392,public X-Google-Thread: 10c696,325850ca8fa5fe66 X-Google-Attributes: gid10c696,public X-Google-Thread: 11663c,325850ca8fa5fe66 X-Google-Attributes: gid11663c,public From: hpa@transmeta.com (H. Peter Anvin) Subject: Re: Can a PIPE input be FLUSHED? Date: 1998/08/06 Message-ID: <6qbpi6$ikq$1@palladium.transmeta.com> X-Deja-AN: 378451787 Content-Transfer-Encoding: 8bit References: <35C8C4A1.93FCECDC@dvsystems.com> X-Comment-To: Rod Tolosa <rod@dvsystems.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: Transmeta Corporation, Santa Clara CA Copyright: Copyright 1998 H. Peter Anvin - All Rights Reserved Mime-Version: 1.0 Reply-To: hpa@transmeta.com (H. Peter Anvin) Newsgroups: comp.os.linux.development.apps,comp.os.linux.development.system,dc.org.linux-users Disclaimer: Not speaking for Transmeta in any way, shape, or form.