The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Communication over firewall ajnabi Security 5 09-02-2008 12:40 PM
Communication Failures barun agarwal HP-UX 1 10-01-2007 05:48 AM
Interprocess communication status jerardfjay UNIX for Advanced & Expert Users 4 07-15-2005 08:49 AM
Interprocess communication using pipes and fork scmay UNIX for Advanced & Expert Users 2 10-14-2004 06:44 PM
serial communication KrazyGuyPaul UNIX for Dummies Questions & Answers 1 01-23-2003 10:50 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-20-2004
Registered User
 

Join Date: Apr 2004
Location: Melbourne
Posts: 15
Stumble this Post!
Unhappy Pipe, interprocess communication

Earlier I posted a question regarding this issue. I managed to go a step further. Anyway, this is another similar question

Write a programme that creates a ring of three processes connected by pipes. The first process should prompt the user for a string and then send it to the second process . The second process should reverse the string and send it to the third process. The third process should convert the string to uppercase and send it back to the first process. When the first process gets the resultant string, it should display it to the terminal. When this is done, all three processes should terminate

I managed to write from A->b->c, but I do not know how to join from C -> A.
mY lecturer asked me to create another pipe in advance before A starts fork(), and I did so, but although I pass in the message I do not get any result. On top of that, the B->C is also affected, it is not showing any result anymore.

Anyone able to help on this?
Greatly appreciate it.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-23-2004
moxxx68's Avatar
Registered User
 

Join Date: Mar 2004
Posts: 301
Stumble this Post!
Question giveexample of what you have done so far.....

so far from what I have understood what you are asking is pretty basic but there is no given example of the work that you have done already and the siubject that you are talking about sounds is pretty broad..
this i would say try a loop... say! a for or while loop and nest an if statment to guarantee that the commands you want to execute get executed...
ex.,
while (expression)
do (-------------------------->a
if (expression)
then......................................>b
(command)
else..........................................>c
(command)
fi
done (loop) use break coomand to terminte loop at specific point
if expression a is a always true c will go back to a
moxxx68
__________________
moxxx68
http://www.estarinformado.com.ar/apicmaxmiel/bee-diez.gif
Reply With Quote
  #3 (permalink)  
Old 10-23-2004
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Stumble this Post!
Post what you have, lets see what you have done. Are you writing a C program or are you attempting to do this in shell using co-processes or signals.

Last edited by google; 10-23-2004 at 06:12 AM.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:36 PM.


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

Content Relevant URLs by vBSEO 3.2.0