|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
can anyone tell me the program about how to implement a routine similar to getpid() in C program without using the function getpid(). ie. the program has to find out the pid of the process without using the getpid command. Please do help me in this regards at the earliest.
|
| Sponsored Links |
|
|
|
|||
|
Where I come from, getpid() is a system call. Anything that gets it is going to be using getpid() to do so, eventually; there's nothing below it to use.
If a simply less direct method will do, check if you've got /proc/self on your system -- it'll be a symlink to /proc/<pid#> |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|