problems with sighold() and sigrelse()

zaccone at psuvax.UUCP zaccone at psuvax.UUCP
Thu Aug 4 13:19:28 AEST 1983


I have a program that uses sighold and sigrelse to try to prevent a
write operation from being interrupted.  TANDEM and RAW modes are set,
and the code looks something like this:

sigset(SIGINT, fn);

sighold(SIGINT);

block of code with some writes in it

sigrelse(SIGINT)

If an interrupt occurs between the sighold and the sigrelse calls, the
function fn is called as expected after the sigrelse call.  Even though
all of the writes have been successful (the correct number of bytes has
been written in each case), when the function fn is entered, the output
device is hung because it has not received all of the characters from
the last write operation.

Does this have something to do with the fact that TANDEM mode is set?
Doesn't a successful return from a write mean that all characters have
reached the output device?  What's going on here?

Rick Zaccone
{allegra, burdvax}!psuvax!zaccone



More information about the Comp.unix.wizards mailing list