LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-24-2008, 07:51 AM   #1
leedude
Member
 
Registered: Jan 2007
Location: Scotland
Distribution: Fedora, Debian
Posts: 81

Rep: Reputation: 15
messing with a FIFO


hi, i need to use interprocess communication, and have done a little reading.
it seems i need a FIFO file.
as i understand it, if a process tries to read from an empty FIFO, the process is halted until another process writes something to it.

likewise, if a process tries to write to a full FIFO, it is halted until another process reads from it.

so heres what i did:

i open a terminal and type:
Code:
mkfifo fifo
cat fifo
like i predicted, cat seems paused.

i then open another terminal and run:
Code:
echo text > fifo
this command runs, but cat still remains halted in the other terminal.
i thought that cat would spit out the new 'text'.

have i got the wrong idea about something?
 
Old 07-24-2008, 08:04 AM   #2
leedude
Member
 
Registered: Jan 2007
Location: Scotland
Distribution: Fedora, Debian
Posts: 81

Original Poster
Rep: Reputation: 15
oops, a typo on my part.
i was using echo 1 > fifotest
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux 2.6 FIFO vs Linux 2.4 FIFO gjpc Programming 4 03-19-2008 07:26 PM
fifo help !! matlin Linux - Newbie 1 02-21-2008 01:51 PM
snmptrapd FIFO eccsamba Linux - Networking 2 11-24-2004 08:52 AM
FIFO using pointers AquamaN Programming 2 03-21-2004 05:51 PM
FIFO question gauge73 Linux - Newbie 1 02-28-2003 11:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:04 AM.

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