Is a reentrant set?

Does it repeat itself int puts(const char*);? Can I safely put it in a signal handler?

+3
source share
2 answers

Here is a table with all the functions considered safe for signal processing:

"The following table defines a set of functions that should be either reentrant or non-interruptible signals and an asynchronous safety signal."

putsdoes not seem to be on this list, however on this , it is considered reentrant, but not safe for asynchrony, perhaps why it is not on the above list.

+3
source

, , write(), , :

#include <unistd.h>

const char* msg = "The message to print.";
write(STDOUT_FILENO, msg, strlen(msg));
+1

All Articles