Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Computer Science · Glosario

¿Qué es Waiting for a child?

Definition 13.8 University Computer Science — Year 2 · Capítulo 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.

Leer en el capítulo →