Is there a PID 0?
Hello,
I'm currently doing some debugging and I'm attempting to find out which task is running between two events. I'm using a bus analyzer to trigger after I configure my hardware and stopping it once an overflow event takes place. During this period, I write the PID of the current task running every millisecond by checking the variable 'currnet->pid'. It seems that the task's PID right before my overflow event is 0. A quick 'ps' reveals that there is not a task 0. I'm curious if anyone would know off-hand what a PID 0 represents? If I had to guess, I would say it's an interrupt handler, but I can't be positive. Any feedback is very appreciated! Thanks, Galbatross. |
The lowest PID in UNIX/Linux is PID 1 which is init. All processes are children of init in the process table heirarchy.
My guess is that you're not seeing PID 0 but rather are getting a non-existent value being interpreted as "0" before you have a PID number assigned. |
Nope. This comes up continually.
Have a read of this for example. |
Thanks
Very helpful, thank you.
Galbatross |
if you're pleased with the answer, please mark this thread as solved !
Have a nice day and enjoy LQ :hattip: |
All times are GMT -5. The time now is 02:17 AM. |