Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Waiting for a child?

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

Baca dalam konteks →