What constitutes asynchronous-safeness
问题 It is said that you should only call asynchronous-safe functions inside a signal handler. My question is, what constitutes asynchronous-safeness ? A function which is both reentrant and thread safe is asynchronous-safe I guess? Or No? 回答1: Re-entrance and thread safety has a little or nothing to do with this. Side effects, state and interruption of those functions are facts that matter. asynchronous-safe function [GNU Pth] A function is asynchronous-safe, or asynchronous-signal safe, if it