This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SIGXFSZ signal creates defunct process in multithreaded program!!!


Hi Pijush,

[Note: your question is off-topic for the GCC-help forum. Questions for this forum are regarding GCC in particular, not general C++ questions, not PThread questions, not Linux questions, not Solaris questions, not other library questions (except where those things are interacting with GCC in particular). Having said that...]

Don't do any I/O inside a signal handler.

Don't call any OS API routines inside a signal handler.

Don't call any non-re-entrant routines inside a signal handler.

If you access any global variables inside a signal handler, makes sure those variables are marked "volatile".

Don't do "too much work" inside a signal handler.

There's probably a few more caveats using signal handlers. That's just off the top of my head.

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]