From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c7b60aff78f20a7 X-Google-Attributes: gid103376,public From: demer@hc17031.hcsd.ca (David Emery) Subject: Re: How to query active processes from Ada Date: 1997/01/06 Message-ID: #1/1 X-Deja-AN: 208117313 sender: demer@hc17031.hcsd.ca references: <5aj97p$a9m@news.spar.ca> organization: HCSD newsgroups: comp.lang.ada Date: 1997-01-06T00:00:00+00:00 List-Id: The short answer is to send SIGNULL to the process with kill(). Naturally this is supported by POSIX/Ada: with POSIX, POSIX_Signals, POSIX_Process_Identification; function Process_Exists (Pid : in Posix_Process_Identification.Process_Id) return Boolean is begin POSIX_Signals.Send_Signal (Process => Pid, Sig => POSIX_Signals.Signal_Null); -- returns normally if Process exists. -- if process does not exist, or is not 'killable' by the -- caller, raises POSIX_Error. return True; exception when POSIX.POSIX_Error => return False; when others => raise; end Process_Exists; dave -- <.sig is away on vacation>