![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
alternately writings
Hi,
can anyone show me how to solve the following exercise in ANSI C? Create 2 process (parent & child). The parent have to create a file called file<pid>, where <pid> is the process ID of the child process. For n times (where n is a constant previously defined) the child process and the parent process alternately write in file<pid> a sentence (like "I'm the child" or "I'm the parent") and their process ID. After n writings the parent process write in file<pid> the termination status of child process. I hope you understand.. It's so important, please help me! Thank's! |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
I'm sorry, we won't do your homework. See point 6 of the rules:
Simple rules of the UNIX.COM forums: Ask your teacher if you're stuck. (and buy ``Advanced Programming in the UNIX Environment'' by Richard Stevens.) On a side note, ANSI C does not have the concept of processes. Therefore, what you want is presumably a POSIX or UNIX solution. |
||||
| Google The UNIX and Linux Forums |