ending a program

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

LTLhawk
New php-forum User
New php-forum User
Posts: 29
Joined: Fri Mar 07, 2003 4:17 pm

ending a program

Postby LTLhawk » Sun Jul 27, 2003 4:14 pm

Hi again,

Is there a way to kill a task thru php. There is a small dos program that runs in the background on my server that I need to end in order to copy the log file. After I have backed up the log file I will restart the program. I just need to know how to kill it first..

thanks

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Sun Jul 27, 2003 8:03 pm

Since PHP is designed to be run on many platforms, and process-killing is a very OS-specific function, PHP doesn't provide this capability. However, if you can find (or create) a program which can be made to kill another process via the command line (in Linux, this is trivial, but I don't belive Windows comes with any such functionality), you can use the program execution functions to issue the kill command. A brief search found this page, which has a few tools which might come in handy. Otherwise, a good Googling should get you what you're after.

LTLhawk
New php-forum User
New php-forum User
Posts: 29
Joined: Fri Mar 07, 2003 4:17 pm

Postby LTLhawk » Mon Jul 28, 2003 2:37 am

thanks swirlee,

I think that will do the trick... Thank you very much...great idea


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron