procmail
[Top] [All Lists]

Re: How to kill an unknown pid in script? (fwd)

1996-01-05 14:24:24

Hi, Happy New Year, all long lost procmail friends,

I want procmail's action line trigger a program running and
send a requester info about the program or whatever file. Now, my
question is, how can I terminate 'the program from running after, say,
'sleep 600'? in my script for the action line?

btw, the program, say, an httpd, it does not usually have running time
option from startup; and as we understand after 'the program'
starts, it creates a pid, which we don't know before the program runs,
so could we kill that unknown pid in a script? (I've manpaged both 'kill'
and 'ps', does not seem to have a 'kill all' option, and logout from the
account does not help either, it's BSD4.3 unix).     

the diagram may look like:

someone's_mail -> my_auto_mailer -> send_that_one_a_file -> (meanwhile)
starts_demo_program  ... then after 'sleep 600' ...
kill_demo_program       -- this process is the PROBLEM


help is much appreciated, pls also email donli(_at_)netcom(_dot_)com(_dot_)

Regards     

Li  http://204.117.165.20/
-- 
Sincerely,                                                          
srb(_at_)cuci(_dot_)nl
           Stephen R. van den Berg (AKA BuGless).

A sign seen at the local pizza place: "DO NOT CARRY TAKE-OUT BOXES BY HANDLES"

<Prev in Thread] Current Thread [Next in Thread>
  • Re: How to kill an unknown pid in script? (fwd), Li Chunshen <=