kill process based on file name
Moderator: General Moderators
kill process based on file name
how to kill process based on file name that runs process. I'm on shared server (cpanel = fantastico)
Hi Feyd and thank you for reply.
Here is what I need
I'm building system that is submitting certain type of data with some servers, and for that I'm using SMPP protocol ( http://www.smsforum.net/SMPP_v3_4_Issue1_2.zip ), which I have already written (by myself) in php. Now when I connect with server and start to exchange data, everything is fine until I want to disconnect myself from server. In other words I have to connect on server, send data, remain connected for 5 more minutes (in case more data comes) and then disconnect from server.
Until now I've menage to connect and send / receive data from / to server, but I can not disconnect my self from it.
That is why I need to kill process to be able to disconnect myself from server.
All suggestions are appreciated.
Kind regards
ddragas
Here is what I need
I'm building system that is submitting certain type of data with some servers, and for that I'm using SMPP protocol ( http://www.smsforum.net/SMPP_v3_4_Issue1_2.zip ), which I have already written (by myself) in php. Now when I connect with server and start to exchange data, everything is fine until I want to disconnect myself from server. In other words I have to connect on server, send data, remain connected for 5 more minutes (in case more data comes) and then disconnect from server.
Until now I've menage to connect and send / receive data from / to server, but I can not disconnect my self from it.
That is why I need to kill process to be able to disconnect myself from server.
All suggestions are appreciated.
Kind regards
ddragas
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
what it sounds like you want to do is this:
Does that pretty much sum it up?
Code: Select all
// remove the script timeout
set_time_limit (0);
// enter your loop
while(1){
// check to see if you're finished
if($task_complete){
// clean up and...
die;
}
// look for input, send output
// set a sleep delay so your script doesn't take over the server
usleep(200);
}yes - and this is prity much what am I doing right now, only in the middle of exchanging data id "enquire link" command that keeps connection up.
But I wan't to be able to kill process for any reason. Want to have controll over it. Like STOP button in factory in case of emergency
Is there any way so I can kill process ?
But I wan't to be able to kill process for any reason. Want to have controll over it. Like STOP button in factory in case of emergency
Is there any way so I can kill process ?
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact: