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.
Computer Science · Glosarium