Zombie Process Clarification | Write Your Own Shell | Part 4
HTML-код
- Опубликовано: 26 сен 2024
- Hello fam! This video is dedicated to address the slight errors in my previous upload where I talked about the fork system call.
Cheers
🔗 Hi there🙂👋🏽, Connect with me on LinkedIn
/ jesse-braide-4a2235243
Explained beautifully
Nice content, couldnt help but subscribed.. would love to see more. well done
God helping, more is sure to come. Glad you liked it..
Thanks for the clarification Jesse
Thanks Amara. Glad to help
Thanks for the clarification, Jesse.
You're welcome
note that it's not always adopted by the main process( PID 1 ) sometimes it get adopted by some PID that is the PID of the user ( that eventually part of the PID 1 obviously ).
what a cool explanation
- > The unit process adopt the orphan.
-> After the orphan finish executing, unit process collect exit statuses of orphaned processes.
-> Unit process removes the orphan from the process table.
----------Zombie process---------
- If a parent process does not promptly collect the exit status of its terminated child using wait() or waitpid(), the child process becomes a zombie process.
- A zombie process still has an entry in the process table, but it does not consume system resources. It remains in the process table until the parent collects its exit status.
- Once the parent collects the exit status, the zombie process is removed from the process table.
Thanks Jesse
💯
in my case the parent process died and the child process was adopted by 1333 which appears to be the systemd program. This fork systemcall was difficult yet amazing.
note that it's not always adopted by the main process( PID 1 ) sometimes it get adopted by some PID that is the PID of the user ( that eventually part of the PID 1 obviously ).
Thank you so much for this detailed explanation!
The pleasure's all mine. Cheers🚀
@@jess-inspired pro you will complete this series ?
It's like you sabi pass these people oo. thanks boss. New subscriber
Thanks man.💯
Clearly understood
Great to hear.. Expect more
Tnx Jesse
Youre welcome bro
From Timestamp 9:19, I think it should be "getppid()" for the PPID (Parent Process IDentifier) not "getpid()" because "getpid" is for PID (Process IDentifier). Thanks for the help. Appreciate!!
Hello Abdulshahid. You do have a point. Howbeit I used getpid() in the parent block because the pid of the parent is the ppid of the child..
getppid() would sure have been more appropriate if I used it in the child block..
Thanks for your observation though, much appreciated. .
@@jess-inspired it was actually at 8:33 timestamp mark. Thanks though!
perfectt sir!!😇
I was thinking you would use getppid to get the PPID, because using getpid will return the PID of the current process, or do they all work the same?
You are very good. ❤
so , u are explaining the orphan not zombies?!
Yeah, although I did slightly touch on the zombie here.. Mixed up the names previously.. Apologise for whatever confusion it may have caused