Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!usenet From: bruner@sp15.csrd.uiuc.edu (John Bruner) Newsgroups: comp.unix.wizards Subject: Re: driver close from exit can't catch signal? Message-ID: <1990Jul31.143028.20009@ux1.cso.uiuc.edu> Date: 31 Jul 90 14:30:28 GMT References: <26789@nuchat.UUCP> <18901@ttidca.TTI.COM> Sender: usenet@ux1.cso.uiuc.edu (News) Reply-To: bruner@sp15.csrd.uiuc.edu (John Bruner) Organization: CSRD, University of Illinois Lines: 15 In-Reply-To: mb@ttidca.TTI.COM (Michael Bloom) In article <18901@ttidca.TTI.COM>, mb@ttidca (Michael Bloom) writes: >I dealt with a problem somewhat like yours once with a test of the >form "(u.u_signal[SIGKILL -1] == SIG_IGN)", which should only be true >in your close routine if it is called from exit. I didn't really like >it, but it did the job. On (at least some) BSD systems, u.u_signal[SIGKILL-1] == SIG_IGN for processes 1 and 2. You can't ignore kill signals, but the kernel initializes them this way when it spawns "init" and the pageout daemon. It seems unlikely that either of these will call a device's close routine; however, beware of using this technique in other situations. -- John Bruner Center for Supercomputing R&D, University of Illinois bruner@csrd.uiuc.edu (217) 244-4476