![]() |
|
|
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 |
| Process creation | Saurabh78 | High Level Programming | 1 | 09-12-2008 08:43 AM |
| how to Decrease priority of a particular process in time of process creation | Ramkum | UNIX for Dummies Questions & Answers | 2 | 08-04-2008 10:04 AM |
| Getting process info in a program | herbmiller | High Level Programming | 1 | 02-14-2008 12:53 PM |
| get program name give a process id | naren_chella | HP-UX | 1 | 09-01-2006 08:33 AM |
| IO by Process/program | cpiuk | HP-UX | 2 | 09-16-2004 05:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Process creation in Unix with C Program
Hi,
can somebody please help me regarding this? How can i print parent's PID from child's and vice versa. I have tried with getpid() & ngetppid() function but it is not giving me the correct data. The logic i used is: if (pid == 0) { getpid() : Chil'd PID getppid(): Parent;s PID } else { getpid(): Parent's PID; pid: Child' PID; } Output should match, right? But is is not matching. If you have idea, please let me know. With regards, Sudipta |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|