home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sources / wanted / 5365 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.6 KB  |  54 lines

  1. Newsgroups: comp.sources.wanted
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!sgiblab!rtech!ingres!jonm
  3. From: jonm@Ingres.COM (Don't Judge a book by your cover)
  4. Subject: Re: kill-by-name that *works*
  5. Message-ID: <1992Dec14.161245.24863@pony.Ingres.COM>
  6. Summary: 
  7. News-Software: VAX/VMS VNEWS 1.41    
  8. Keywords: 
  9. Organization: University of Arizona MIS Department - Mosaic Group
  10. References: <1gia4iINN5t1@iraul1.ira.uka.de>
  11. Date: 14 Dec 92 16:12:45 GMT
  12. Lines: 40
  13.  
  14. In article <1gia4iINN5t1@iraul1.ira.uka.de>, prechelt@i41s18.ira.uka.de (Lutz Prechelt) writes...
  15. >I have a shell script (written myself) that works most of the time, 
  16. >but when the youngest processes do not have the highest PIDs of all
  17. >existing processes (which is possible, if a system runs long
  18. >enough and PIDs wrap around after about 30000 processes), 
  19. >it gets into trouble.
  20. >  Lutz
  21.  
  22. Lutz,
  23.     You could extend your current script to include a small C routine that
  24. provides the process group information.  This will apply to all processes
  25. that are children of another process.
  26.  
  27. main(argc, argv)
  28. int argc;
  29. char *argv[];
  30. {
  31.     exit getpgrp(atoi(argv[1]))
  32. }
  33.  
  34. Where your first argument is the pid of the process you located in your 
  35. first step.
  36.  
  37. Then let your killing fingers do the talking.
  38. _____________________________________________________________________________
  39. |Jon Machtynger  | Ahhh Brisbane, center of the world.  How I miss a Silvio's
  40. |jonm@ingres.com | Pizza A Jug of Powers and a good spew in the Mall.
  41. +----------------+
  42.  
  43. #include <StdDisclaimer.h> 
  44.  
  45. On UserEvent 'YouAreBeingHeckled'=
  46. {
  47.     While (Status != SS_UNDERSTOOD) Do
  48.         Status = Object(CurFrame.TriggerField).KickInHead().
  49.     EndWhile
  50. }
  51.