Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does waitpid() do?

Tags:

linux

unix

posix

What is the use of waitpid()?

like image 298
Nidhi Avatar asked Sep 08 '10 05:09

Nidhi


1 Answers

It's used generally to wait until a specific process finishes (or otherwise changes state if you're using special flags), based on its process ID (otherwise known as a pid).

It can also be used to wait for any of a group of child processes, either one from a specific process group or any child of the current process.

See here for the gory details.

like image 173
paxdiablo Avatar answered Oct 21 '22 23:10

paxdiablo