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