LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-22-2008, 05:46 AM   #1
rajesh78
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Doubt in Pipes


Hi,
I am new to Linux. I want to learn IPC. Can someone suggest me the url for that.

I tried to understand one simple thing but I am totally confused. Please clear my confusion.

Pipes are used for inter process communication between two process.

// Why it is required??

process means what I think is two exe.

but how it is possible if we are writing two programs ( one is reading a string and other is displaying a string) GENERALY THIS IS NOT REQUIRED IN ANY CASE WHAT I THINK

If one process uses fork and then anoter process is created then we can use pipes to communicate between them. But Here also we can achieve the same thing by using functions. One to read one string and the other is to write the string.

So my overall doubt is when we need to pipe to implement in our program and in what scenario.

Please clear my confusion.
Thanks
 
Old 10-22-2008, 10:57 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by rajesh78 View Post

// Why it is required??

process means what I think is two exe.

but how it is possible if we are writing two programs ( one is reading a string and other is displaying a string) GENERALY THIS IS NOT REQUIRED IN ANY CASE WHAT I THINK

If one process uses fork and then anoter process is created then we can use pipes to communicate between them. But Here also we can achieve the same thing by using functions. One to read one string and the other is to write the string.

So my overall doubt is when we need to pipe to implement in our program and in what scenario.
Linux protects processes from each other. This concept has been in all non-Microsoft operating systems for 40 years. Processes cannot access other processes' memory both to prevent processes from crashing each other and to provide privacy, i.e. processes cannot snoop on each others data.

Obviously processes often need to communicate with other processes. Pipes are one way that processes can communicate with each other in a secure, well defined manner.

--------------------------
Steve Stites
 
  


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
pipes leedude Programming 4 05-20-2008 06:52 PM
how to use pipes? rabbit2345 Linux - Software 2 03-29-2008 01:52 PM
ls pipes and wc 7stud Linux - Newbie 7 02-27-2007 07:24 AM
pipes smart girl Programming 6 04-30-2006 10:20 AM
about pipes kpachopoulos Programming 1 10-15-2005 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:16 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