LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2009, 12:53 PM   #1
navderm
Member
 
Registered: Dec 2008
Location: Chandigarh, India
Distribution: Red Hat 9
Posts: 67

Rep: Reputation: 15
How do i clean a FIFO after one operation and before starting another


I have a fifo which communicates between RT and QT. After a button "STOP" is pressed, i want to clear all the data that is inside it. How do i do this..

the FIFO is pretty big...60KB
 
Old 01-17-2009, 03:34 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
In what sense is it a FIFO? Is it a pipe on the file system, one created in C with pipe, some implementation of a queue, or something else? What happens to the FIFO after "STOP", e.g. does this close the descriptor or leave it open? If it's a proper FIFO (i.e. Unix pipe) then the reading end would just read until it blocks, or read until some sort of "STOP" indicator was read (maybe a null byte.) If it's a FIFO tied to the file system then both ends could close it, then open it up again. Any other implementation entirely depends on how it's constructed.
ta0kira
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FIFO in QT navderm Programming 2 01-05-2009 11:06 AM
A Help with FIFO navderm Programming 1 12-29-2008 04:07 PM
Question about FIFO Sathya Programming 3 07-05-2008 05:11 PM
fifo help !! matlin Linux - Newbie 1 02-21-2008 01:51 PM
Clean Redhat 8.0 install, starting MySQL Fenix Linux - Software 32 02-26-2003 08:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration