what's the opinion on "sigrestartable()"?

chris at umcp-cs.UUCP chris at umcp-cs.UUCP
Sat Apr 21 06:59:06 AEST 1984


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 at umcp-cs		ARPA:	chris.umcp-cs at CSNet-Relay



More information about the Comp.unix.wizards mailing list