[Queue-developers] new intermediate development Queue version
Brought to you by:
wkrebs
From: QingLong <Qin...@Bo...> - 2001-03-09 12:12:53
|
Hello! I've just commited a couple of patches to queue-development CVS tree at sourceforge. Also a few patches had been committed to repository later. Considerable changes since last intermediate version announce: --- Blocked a number of signals in queue (queue.c main()), actually installed signal-counter as handler for these signals (used Queue_io_ignore_unwanted_signals() from qlib.c to do this; see Queue_io_unwanted_sig[] in qlib.c for the signals list). --- Added a few extra signals to the list of counted signals in queued: SIGPIPE, SIGCONT, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, SIGIO (see queued.c main()). Not sure about the last two! (OOB mess?) --- Added checks in Queue_nonblocking_rw() (qlib.c) around select(), read() and write() to see if the signal interrupted us was fatal. Considered SIGPIPE as the only fatal traced (counted) signal, all others (SIGCHLD, SIGALRM, etc. were considered harmless). --- Added signals related stuff in qlib.c to count ``unwanted'' signals to have an ability to find out (on been interrupted by signal) whether that signal was fatal (e.g. SIGPIPE indicates attempt to perform operations on a closed connection socket). --- Added autoconf checks for ulong and ushort typedefs quite in the same style as it is done by GnuPG to make "types.h" (imported earlier from gnupg along with crypto stuff) happy. --- Added functions (in qlib.c) to ignore (remember signal's sigaction structure information on beginning to ignore) and later restore signals from a constant list. These workaround functions are to be used to protect select() from being undesirably interrupted by SIGALRM, SIGURG, SIGPIPE, etc, and to trace out (in debug mode) which of these signals actually arrive while being ``ignore''d. --- Added functions Queue_alarms_stop() and Queue_alarms_goon() in qlib.c: the former sets alarm(0) and remembers previously scheduled alarm timer value, the latter restores that timer value taking into account amount of time elapsed since alarms has been stopped. These workaround functions are to be used to protect select() from being undesirably interrupted by SIGALRM. --- Made Queued verbose flag to be equal debug flag (queued.c main()). --- Fixed: Queue_user_id -> Queue_daemon_id in queued.c main(). Please try it and send your bug reports, opinions, suggestions, improvements to the mailing list. Thank you. QingLong. |