It is currently Fri, 15 Oct 2021 20:25:55 GMT



 
Author Message
 Help grabbing PID of child
Hi all!

There are probably a number of ways to solve this problem (not the
least of which is buying a watch and looking at it regularly), so feel
free to give me *any* suggestions which seem pertinent to the
situation.

I am a student here at UGA, and a SysAdmin for the Stat department.  I
have a memory like a sieve and I have to be reminded of birthdays or
special events (like class times!).  I have found David Skoll's remind
package and have pretty much gotten it to work, except for one thing:
it won't die by itself.  I can log out and it will happily continue to
remind everyone in the office of my appointments.  This, they tell me,
is annoying. :-)

I would like to know how to trap the PID of a process as it's fired off
so I can selectively kill it off later on (kill -HUP).  I don't want to
do this by hand, however, as I currently am.  It's a pain.  I could do
a ps | grep | tail |kill -1 etc etc, but that doesn't work too well.

You see, I work on a Sun 4/20 (at SunOS 4.1.1) and *usually* run Sunview.  
I also pop in and out from various vt100 terminals throughout the day.  
This complicates the matter, because if I run the kill in my .logout,
then *all* remind processes will be killed, including on the con
downstairs, and I'll be late to Geography.  On those occasions when I
don't run Sunview, I usually am not staying long enough to bother.  If
I'm on a terminal, however, then I could be logging in from the Library
between classes, so I need remind so that...

I'm running tcsh 6.00.02 on the abovementioned Sun system.  My thought
had been to somehow capture the PID of the remind proc in a file and
then kill `cat .remfile` or something like that.  In case I come in on
a vt100, it would be nice but not imperative if I could push and pop a
PID list, so that each proc killed off it's own copy of remind.

Whew!  This sure got long in a hurry.  I guess I'll end this here and
wait for someone to tell me what I forgot to mention :-)

Thanks all for your help.  email is probably the forum for this, unless
folks are really interested in catching PIDs.  I'll be summarizing
unless told not to...

:-D
--
David Gundlach                          da...@marie.stat.uga.edu
System Support and Integration          da...@rolf.stat.uga.edu
UGA Statistics                          BITNET: statuga@uga
University of Georgia                   404/542-3289 or 404/542-5232

"I think, therefore I am wrong." --   me



 Sun, 06 Mar 1994 03:38:15 GMT   
 
   [ 1 post ] 

Similar Threads

1. obtaining child PID in a child subshell

2. Help: PID of a popen() child...?

3. Grabbing pid from inside of a C program

4. fork() and grabbing stdout / stdin of child

5. pid 25's child link is bad

6. child process' killer's pid

7. kill a child pid?

8. Child process PID

9. checking on the status of a non-child pid


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software