From: utzoo!hcr!phb
Newsgroups: net.unix-wizards
Title: compat (v7run)
Article-I.D.: hcr.203
Posted: Tue Sep 14 09:06:57 1982
Received: Tue Sep 14 09:07:58 1982

I have also had fairly good results using compat and found that it
worked reasonably well (except floating point which doesn't seem to work
at all). I did run into a bug though. The problem is caused when a
you do a pause (sleep) and then receive a signal to be woken up the pc
is clobbered so that the signal catching routine is not executed.
This only happens if the pause is a direct system call as opposed to 
an indirect call (which apparently it is). The code which causes the
error is near the bottom of unixtraps.c :
	if( indirflg == 0 )
		pc = argp;

My solution was to set a new flag in the routine dosig to indicate that a
signal had been caught and then change the above test to:
	if( !indirflg && !sigtrapped )
		pc = argp;

The sigtrapped flag is set to zero at the beginning of unixtraps.c
It seems to work.
cheers.

	Paul Breslin
	decvax!utzoo!hcr!phb