home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4289 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  1.5 KB

  1. Xref: sparky comp.unix.programmer:4289 comp.unix.misc:3224
  2. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!ogicse!orstcs!orstcs!usenetusenet
  3. From: herberj@prism.CS.ORST.EDU (John Wesley Herberg)
  4. Newsgroups: comp.unix.programmer,comp.unix.misc
  5. Subject: Process & Signal Question
  6. Message-ID: <1992Aug14.013450.9864@CS.ORST.EDU>
  7. Date: 14 Aug 92 01:34:50 GMT
  8. Article-I.D.: CS.1992Aug14.013450.9864
  9. Sender: usenet@CS.ORST.EDU
  10. Organization: Oregon State University, Computer Science Dept.
  11. Lines: 20
  12. Nntp-Posting-Host: prism.cs.orst.edu
  13.  
  14.  
  15. 1 - Is there an effecient way for one process to know if another is running 
  16. when the only thing you know about it is its name.  The way I'm doing it now
  17. is grabbing info for all the processes by using pstat(an HP-UX call) &
  18. searching through that info for a matching process name.  Is there some type 
  19. of call I could do on the executable to see if it is in use.  I noticed
  20. make doesn't allow you to update a file when its being used - how does it know?
  21.  
  22. 2 - In Marc Rochkind's "Advanced Unix Programming", he says it's not a good
  23. idea to use the SIGUSR1/2 signals for user defined signals.  Why?  All I want 
  24. to do is notify another process of an event & I don't want the overhead of a
  25. msg, shared mem, etc.  Seems to me this would be the most effecient way.  Is
  26. there something else I should know about using signals?
  27.  
  28. BTW, I am working on HP-UX.
  29.  
  30. Any help much appreciated,
  31. -- 
  32. -----------------------------------------------------------------------
  33. John W. Herberg                       Internet: herberj@prism.cs.orst.edu
  34.