List of routines safe to use in signals?

Anton Rang rang at cs.wisc.edu
Tue Dec 11 15:17:47 AEST 1990


  Is there a list of library routines which can safely be used within
a signal handler under any of the "standard" UNIX versions (preferably
POSIX, but I'd like BSD 4.3 and SVR4 info as well)?  Presumably this
is in the POSIX standard, but if anybody has an online copy of such a
list, I'd appreciate it.

  So far, I know to avoid functions which use static areas of memory
for their return value (e.g. getpwent), and I avoid the standard I/O
routines (e.g. fprintf) unless I know that the file won't have other
I/O going on at the time.  I also save and restore errno, which is
perhaps overkill....

  Anyway, is such a list available on the net somewhere?  Lacking
that, is there a reasonable heuristic to guess what's safe?

	Anton
   
+---------------------------+------------------+-------------+
| Anton Rang (grad student) | rang at cs.wisc.edu | UW--Madison |
+---------------------------+------------------+-------------+



More information about the Comp.unix.programmer mailing list