Path: utzoo!utgpu!watserv1!watmath!att!mcdchg!ddsw1!corpane!disk!stevenw From: stevenw@disk.UUCP (Steven Weller) Newsgroups: comp.os.os9 Subject: Re: signal problem Message-ID: <3943@disk.UUCP> Date: 20 Aug 90 00:41:32 GMT References: <5596@ethz.UUCP> Organization: Digital Information Systems of Ky (DISK), Louisville, Ky Lines: 49 stp@ethz.UUCP (Stephan Paschedag) writes: >Hi There ! >I have a Question about signal handling of the OS-9/68k kernel. >Situation : > I have a filemanager which has executed a F$Sleep call (time=0). > During that sleep a signal arrives for the sleeping process. >Question : > > Is it necessary to exit from the FM to ensure that the intercept- > handler of the process is called. > Or is the intercept handler called before the process returns from > the F$Sleep (system state !), so that the FM can ignore the > unexpected return from the sleeping state : > Loop: moveq.l #0,d0 > os9 F$Sleep > bcs.s Loop (E$NoClk is ignored for this example !) >Thanks in advance for your help ! IYour second guess is correct. OS-9 queues signals that are received by a process, calling the intercept routine before the process is given CPU time (note that the intercept routine uses time out of the process time slice). This is true of the later versions of OS-9. Earlier versions did not have a queue for signals. It is worth checking the signal code in your program fragment. If it is a fatal signal - hangup, quit, abort etc. then you should return with the signal code as the error number with the carry flag set. If you don't do this, someone may be bashing away at the ^E key and getting very frustrated ! For a similar reason, check if the process has been killed. The condemn bit in the process state will be set if this is the case. Exit with a 224 error. Hope this helps, Steve -- : Phone: (502) 425 9560 << Steven Weller >> Fax: (502) 426 3944 : : Windsor Systems, 2407 Lime Kiln Lane, Louisville, KY, 40222 USA : : "A substance almost, but not quite, entirely unlike tea" : : stevenw@disk.UUCP or uunet!ukma!corpane!disk!stevenw :