unistd.h contains standard stuff using to do system level programming on Unix systems (hence the name)
pid_t is just a data type. Like float store decimals, pid_t stores numbers that identify different processes. pid is short for process id. Every process running on your system has a unique number to identify it. You can store that in a variable of type pid_t and you get pid values through functions and system calls like getpid which returns the pid of the current process calling it or like in this case fork which returns to the parent process the pid of the child.
Thank you Op for providing us with good reference material. I have to teach an It lecture next semester and was struggling to find good sources to cite
At this point reality has to be a simulation, i just learnt this today (never heard or read about this before today) and now there is this meme. IDK how this happens everytime. I even thought of a similar joke "Oh! they foking".
216
u/GGdna Sep 02 '22
Sauce:
Miitoban - Jinrui niha Hokentaiiku ga Hituyoudesu (Humanity Needs Health and Physical Education)
page 4
229676
200
u/redvelvetycupcake Sep 02 '22
Looks like they're calling
execveon user-controlled input with no validation/sanitization, so one might say this is... unprotected forking57
u/walnutbrocookie Sep 02 '22
Thank you Op for providing us with good reference material. I have to teach an It lecture next semester and was struggling to find good sources to cite
35
u/Kyocus Sep 03 '22
Me: Googling "headless child"
My FBI Agent: "What in the Heill?!"
22
u/Dark_Lord9 Sep 02 '22
Best post I see here in a very very long time. And thanks for the sauce.
16
u/GnuhGnoud Sep 02 '22
Sir, you have my respect for making such a good meme.
12
u/[deleted] Sep 02 '22
At this point reality has to be a simulation, i just learnt this today (never heard or read about this before today) and now there is this meme. IDK how this happens everytime. I even thought of a similar joke "Oh! they foking".