home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!primerd.prime.com!hacker.Prime.COM!jtb
- From: jtb@hacker.Prime.COM ( James Bruner )
- Subject: Checking if a process is still logged in
- Message-ID: <1992Sep15.230413.16697@primerd.prime.com>
- Followup-To: comp.unix.programmer
- Keywords: pid
- Sender: usenet@primerd.prime.com (Usenet)
- Reply-To: jtb@hacker.Prime.COM
- Organization: Prime Computer, Renton, WA
- Date: Tue, 15 Sep 1992 23:04:13 GMT
- Lines: 21
-
- What I'm trying to do is to check and see if a process is logged in
- or not. The process is not a child but I do know its pid. Currently
- I've been using a system(3) call with ps piped to grep which is piped to
- a file. I then open file and check for the pid I'm looking for. I've
- also setup signals and ipc on the processes in question. I can then check
- by sending the process a sigusr2 or something and wait for him to send
- me a ipc message back.
- what I'm trying to find out, being new to the game, is are there better
- ways on doing what I'm doing. How have other people needing to do
- this jumped this hurdle.
-
- Thanks for any input you can give me!
-
- --
- ===================================================================
- *
- James Bruner | Internet: J.Bruner@CS-REN.Prime.COM
- Technical Support | or jtb@hacker.Prime.COM
- Computervision, Renton, WA | Phone: (206) 251-0879
- *
- ===================================================================
-