home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4671 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.5 KB  |  35 lines

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