Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Async-signal-safe function?

Definition 14.11 University Computer Science — Year 2 · Bab 14 — Files, Pipes and Signals

A function is async-signal-safe when it can be called safely from within a signal handler. POSIX lists them: write, _exit, waitpid and most plain system calls are; printf, malloc and anything that takes a lock or touches a shared buffer are not.

A signal’s delivery. Sent, it is pending until the kernel next returns to the process in user mode; the handler then runs on the process’s stack, and when it returns the program goes on as if nothing had happened, except what the handler changed.
A signal’s delivery. Sent, it is pending until the kernel next returns to the process in user mode; the handler then runs on the process’s stack, and when it returns the program goes on as if nothing had happened, except what the handler changed.
Baca dalam konteks →