Path: utzoo!utgpu!water!watmath!clyde!att!ucbvax!ICAEN.UIOWA.EDU!dbfunk From: dbfunk@ICAEN.UIOWA.EDU (David B. Funk) Newsgroups: comp.sys.apollo Subject: Re: Suspending processes (was questions for the gurus) Message-ID: <8809151847.AA10608@umaxc.weeg.uiowa.edu> Date: 15 Sep 88 18:46:05 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 38 There are 2 ways to really suspend a process, a suspend signal and a (undocumented) suspend system call. If a process is given a fault_$suspend_proc signal it will stop execution until it receives a fault_$continue_proc signal (look in /sys/ins/fault.ins.{pas,c,ftn} for their definition). To give one of these signals you will have to use /com/sigp with the "-c" option. EG: '$ sigp -c 120027 process_151' will cause process_151 to stop execution. In a pst it will be listed as in a Wait state but a 'tb process_151' will show that it is in a suspend fault condition. WARNING, only a continue signal will take it out of the suspend. If the process receives some other type of signal first, such as a stop or quit, the other signal will block the continue signal and the process is in gridlock and can only be blasted. So if you have any questions as to what a waiting process is up to, first do a 'tb' on it. If you see something like: $ tb siologin_1 In System Service "ec2_$wait" Called from Diagnostic Frame - process suspend fault (OS/fault handler) Called from "GET_IT" line 931 Called from "SIO_GET" line 964 Called from "STREAM_$GET_REC" line 150 Called from "readline" line 67 Called from "builtin" line 651 ... then give that process a "-c 12002b" signal before doing any thing else to it. The DM 'ds' and 'dc' commands use undocumented system calls to suspend and continue a process. These work in the kernal and actually change the process manager dispatch status. This will show up in a pst state as 'Susp'. This is safer as a 'dc' cannot be blocked by another signal but the process must be continued before it will respond to any signal. IE you will have to continue it before your stop or kill signals will take effect. Dave Funk dbfunk@icaen.uiowa.edu