[Sigsafe-devel] Various issues
Status: Pre-Alpha
Brought to you by:
slamb
|
From: Marcin 'Q. K. <qr...@kn...> - 2005-11-17 14:50:21
|
Hello. I added conditional usage of sigsafe in the runtime of my compiler of my language Kogut <http://kokogut.sourceforge.net/>. Thanks for the library, it seems to work, I hope it's stable. Here are various issues with sigsafe I encountered: - It compiles with debug=1 by default, which causes signal handlers to write [S] to stderr. It's not even documented, and changing it seems to require editing SConstruct. - sigsafe_install_tsd must be called after sigsafe_install_handler has been called at least once. This fact is not documented. I think sigsafe_install_tsd should be usable when called first too. - sigsafe_read and sigsafe_write return int instead of ssize_t. - There is no binding for open, which may block in case of a fifo. - There are no bindings for send, sendto, recv, and recvfrom. I would not use them, because I use sockets in non-blocking mode only, but perhaps somebody else would. - When looking at sources, I saw: | static void sigsafe_init(void) { | /* "volatile" so our seemingly-useless references aren't optimized away. */ | volatile void *fp; Here volatile applies to the target of the pointer, not to the pointer itself, so it doesn't change anything. - The documentation says that read might trigger SIGPIPE. I believe this is false, SIGPIPE is generated only for writing. -- __("< Marcin Kowalczyk \__/ qr...@kn... ^^ http://qrnik.knm.org.pl/~qrczak/ |