The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Doubts on FIFO Akshay UNIX for Dummies Questions & Answers 0 06-06-2008 04:56 AM
FIFO Pipes tej.buch UNIX for Advanced & Expert Users 4 02-10-2006 11:01 PM
FIFO issue runawayNinja High Level Programming 1 04-29-2004 12:10 PM
FIFO over NFS saabir UNIX for Advanced & Expert Users 2 08-06-2003 05:03 AM
Pipe & fifo.... M3xican High Level Programming 4 07-20-2002 04:22 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-03-2006
Registered User
 

Join Date: Mar 2006
Posts: 18
how to use fifo

hi, I have a problem. I've done a lil program which gets from the server the given persons username a personal folder. I made it with a pipe calling popen with a command, but how can i make the same thing using fifo. I make the fifo with mkfifo() func. and than what. How do I tell the sertver using the fifo file that I need a persons usr name and personal folder.
any kind of help is appreciated.
Reply With Quote
Forum Sponsor
  #2  
Old 06-03-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,616
A fifo works pretty much like a pipe....
Code:
$ echo one two three | tr t T
one Two Three
$ mkfifo george
$ tr t T < george &
[1]     14967
$ echo one two three > george
$ one Two Three
$
[1] +  Done                    tr t T < george &
$
In both cases one process reads and the other process writes. This brings up the main difference, with modern pipes, it is possible to move data in both directions...but this is seldom done. A fifo is unidirectional only.
Reply With Quote
  #3  
Old 06-03-2006
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,469
For starters, you may find this page useful:

http://beej.us/guide/ipc/fifos.html
Reply With Quote
  #4  
Old 06-05-2006
Registered User
 

Join Date: May 2006
Posts: 101
Are you sure you need fifo's or is it only a trial ?
instead of fifo's you can easly use (unix-) sockets or do 'man socketpair' if you have to processes to connect.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0