elias@eosp1.UUCP (Doug Elias) (04/18/84)
*
..!seismo!mike <i think this is Mike Muus?> proposed a new
system-call,
sigrestartable()
which would be utilized to allow processes to select either pre-4.2
signal-handling, or 4.2-style; the primary difference addressed is
whether or not a system-call should be resumed after being interrupted.
...i don't recall seeing a lot of discussion about this; we develop
s/w on VAXen that gets down-loaded to other boxes for actual shipment
to customers, and some of the code that needs testing prior to down-
loading has some dependencies on interruptable system-calls; if we
want to retain that testing-ability, we'll probably have to "enhance"
our kernel with something like what was proposed...right?
...anybody else have "important" s/w depending on interruptable-
system-calls?
dougchris@umcp-cs.UUCP (04/20/84)
I'd rather have the kernel look at the return value from the called
routine, to decide whether to restart system calls or not. Then you
can have two C libraries, "-l4.1" and the default. -l4.1 would have
a signal system call that looks something like
static int (*_sigtraps[32])();
static
_signal (sig, pc, and whatever else goes here) {
(*_sigtraps[sig]) (sig, pc, and ...);
return EINTR; /* just an example, who knows that
the "right" values would be */
}
signal (sig, d) int (*d)(); {
_sigtraps[sig] = d;
_signal (sig, _signal);
}
This would mean that compiling with the "4.1 compatibility library"
would get you the old behaviour, while using the standard library
would give you your choice.
Libraries are a very good way to do backward compatibility!
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690
UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet: chris@umcp-cs ARPA: chris.umcp-cs@CSNet-Relay