![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| function and pipe | Orbix | UNIX for Dummies Questions & Answers | 2 | 01-01-2008 03:57 AM |
| Replace a Pipe with tab | srikanthus2002 | Shell Programming and Scripting | 1 | 04-25-2007 06:22 AM |
| Named PIPE | Tamil | UNIX for Dummies Questions & Answers | 2 | 01-17-2007 03:20 AM |
| Problem with pipe into sed | 98_1LE | Shell Programming and Scripting | 2 | 08-13-2005 04:40 PM |
| PIpe Spy | jodders | High Level Programming | 11 | 02-18-2004 10:44 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
pipe help
i made a lot of processes. here is the code:
main() { printf("\nEnter K="); scanf("%d",&k); printf("Enter L="); scanf("%d",&l); printf("\nFather id=%d\n",getpid()); x=0; makechild(); sleep(2); return 1; } int makechild() { for(q=1;q<=k;q++) { if(f=fork()) { } else { printf("\nChild id=%d owner=%d\n",getpid(),getppid()); ++x; if(x<l) makechild(); sleep(1); exit(0); } } return; } it basically creates a tree of processes over L rows, each process having K sons. now, my question is: how can i make these processes comunicate between them? i figured i would need a lot of pipes but i can't seem to implement them and i'm getting sick with 'broken pipe' error. can anyone give me some advice? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|