[NTLUG:Discuss] kill a process

Stuart Johnston saj at thecommune.net
Wed Aug 30 10:49:38 CDT 2006


m m wrote:
> All:
> 
> As a web developer i always to use php to develop my "software application".
> now I need to send an email alert on a regular basis.
> What I did is use php to create an email alert "web page".
> It works but I have to close/quit the "links" manually.
> I am going use cron to run "links" to invoke the page.
> I expect the process "links" will hang on there after the email send out.
> How do I kill the process after it done?
> I can get the pid by "pidof links"
> i know kill --- kill PID
> How do I
> kill "pidof links"?
> 
> please help, thanks

Wow!  I'm sorry but that sounds like a really crazy idea, on multiple levels.  Why don't you just 
call the php script from the command line?

To answer your question though, in a bash script $! will give you the pid of the last executed 
background process.



More information about the Discuss mailing list