Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!harpo!seismo!rlgvax!cvl!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.unix-wizards Subject: Re: what's the opinion on "sigrestartable()"? Message-ID: <6637@umcp-cs.UUCP> Date: Fri, 20-Apr-84 15:59:06 EST Article-I.D.: umcp-cs.6637 Posted: Fri Apr 20 15:59:06 1984 Date-Received: Sun, 22-Apr-84 08:40:02 EST References: <798@eosp1.UUCP> Organization: Univ. of Maryland, Computer Science Dept. Lines: 28 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