SysV Signals and System Calls

Suu Quan quan at hplabsb.UUCP
Sat Sep 24 10:14:19 AEST 1988


In article <149 at poseidon.UUCP>, fred at athsys.uucp (Fred Cox) writes:
> We have a large program initially written on suns, which we now need
> to port to various System V machines.  The problem that we are coming
> up with is that in BSD 4.2 systems, systems calls are not disturbed
> by signals, while System V system calls return an error.  We need signals
> for timer events.  What do people do in those cases where they are
> using packages, like X Windows, which wait in system calls (read) while
> signals may be occurring?
> 
> ------------------------

The interrupt service routine should restart the system call :

#include <signal.h>

static int
interrupt_routine(signo, code, scp)
int signo, code;
register struct sigcontext *scp;
{  if (scp != NULL) scp->sc_syscall_action = SIG_RESTART;
   other_actions();
}



More information about the Comp.unix.questions mailing list