Take the 2-minute tour ×

programm write current process id in file with function getpid() exemple 1100, but wenn command top run, i becomme process id 1101!!!!! why

share|improve this question
Are you using fork() or similar calls in your program? Can we see your code? –  Shrey Jul 5 '10 at 15:48
add comment

2 Answers

There are other, similar IDs that top can display, e.g., the thread ID or the process group ID.

share|improve this answer
top display always old id von getpid()+1, why!!! –  farka Jul 5 '10 at 13:31
add comment

It is not at all possible. Both the getpid function output and the id displayed by top will be same. I hope you are confusing something.

Can you please briefly expain, how you are doing all these ?

share|improve this answer
add comment

Your Answer


