Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Async-signal-safe function » ?

Definition 14.11 University Computer Science — Year 2 · Chapitre 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.
Lire dans le chapitre →