Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Waiting for a child » ?

Definition 13.8 University Computer Science — Year 2 · Chapitre 13 — Processes and System Calls

A process waits for a child with waitpid(pid, &status, 0), which blocks until that child has ended and returns its PID; wait(&status) does the same for any child. The integer status encodes how the child ended: WIFEXITED(status) is true when it ended by returning from main or calling exit, and WEXITSTATUS(status) is then the low 8 bits of its exit status; WIFSIGNALED(status) is true when a signal killed it, and WTERMSIG(status) is the signal’s number.

Lire dans le chapitre →