Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.UUCP Newsgroups: comp.unix.questions Subject: Re: question about signal Message-ID: <6487@brl-smoke.ARPA> Date: Mon, 28-Sep-87 15:32:32 EDT Article-I.D.: brl-smok.6487 Posted: Mon Sep 28 15:32:32 1987 Date-Received: Tue, 29-Sep-87 04:49:00 EDT References: <720001@hpclmar.HP.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <720001@hpclmar.HP.COM> mar@hpclmar.HP.COM (Michelle Ruscetta) writes: > Should the return from a signal handling routine specified by a call > to signal() go to the instruction which caused the signal, or to the > instruction immediately following that which caused the signal? If it's an asynchronous trap, it should complete the interrupted instruction sequence. If it's a synchronous trap (e.g. SIGFPE), there is no "right" answer. Presumably the synchronous exception occurred because some machine operation had invalid operands; unless you can be sure that the signal handler has fixed the operands (which is almost never the case, due to code optimization etc.), retrying the faulting instruction would just cause another trap. Portable, robust programs should not just return from a SIGFPE handler.