problems with sigset, sighold and sigrelse.

Spencer W. Thomas thomas at utah-gr.UUCP
Sat Aug 6 14:22:42 AEST 1983


	Right now, I'm trying something like this:
	
	sigset(SIGINT, fn);
	sighold(SIGINT);
	...	some code with writes in it
	sigrelse(SIGINT);

	Even with this code, some write operation gets interrupted and does not
	return normally (# of bytes attempted != # actually written).

This is clearly a confusing situation.  What the sighold/sigrelse pair
guarantee you is that the write will have actually written as many
characters as it said it did.  It may only do a partial write, though.
Without the sighold/sigrelse pair, the write might say that it had
written 100 characters, while it had actually written only 47.  This is
clearly much harder to recover from.

=Spencer



More information about the Comp.unix.wizards mailing list