driver close from exit can't catch signal?
John Bruner
bruner at sp15.csrd.uiuc.edu
Wed Aug 1 00:30:28 AEST 1990
In article <18901 at ttidca.TTI.COM>, mb at 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 at csrd.uiuc.edu (217) 244-4476
More information about the Comp.unix.wizards
mailing list