Xref: utzoo comp.lang.c:19814 comp.unix.questions:14808 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!dinl!noren From: noren@dinl.uucp (Charles Noren) Newsgroups: comp.lang.c,comp.unix.questions Subject: malloc's and signals -- a dangerous mixture? Keywords: C,UNIX,malloc,signal Message-ID: <1064@dinl.mmc.UUCP> Date: 10 Jul 89 16:40:59 GMT Reply-To: noren@dinl.UUCP (Chuck Noren) Followup-To: comp.lang.c Organization: Martin Marietta I&CS, Denver CO. Lines: 17 While reading the C standards group I came across the comment that malloc's are dangerous to use in combination with signal handlers. I can see the potential problem if the malloc library uses static storage and an malloc is interrupted with another malloc in a signal handler. Could someone shed some light on the subject and possibly provide some rules when malloc's are safe (and portable) to use with signals. Information specific to Sun 3 with SunOS 4.0 along with issues dealing with other systems in general is desired. Thanks in advance. -- Chuck Noren NET: ncar!dinl!noren US-MAIL: Martin Marietta I&CS, MS XL8058, P.O. Box 1260, Denver, CO 80201-1260 Phone: (303) 971-7930