Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > killing process

Reply
Thread Tools

killing process

 
 
Mark d.
Guest
Posts: n/a
 
      04-08-2004

I have been trying to make this function run that is triggered from a
button on a Python rendered webpage. Clicking the button gets a
processID, sends a kill command for the process and then generates a
simple web page that displays the processID but the 'kill' command is
not carried out.

def restart():
pid = os.popen('pidof myProcess').read().strip()
os.popen('kill -9 %s' %pid, 'w').close()
print CGI()
print HTML(
HEAD('restart', None),
BODY(None,
'process id:',
pid
))
return 1

This works just fine in the interpreter.
Anyone have any ideas what I am overlooking?

Cheers,
Mark d.

 
Reply With Quote
 
 
 
 
Aloysio Figueiredo
Guest
Posts: n/a
 
      04-08-2004
* Mark d. <(E-Mail Removed)> [08-04-2004 16:26]:
> This works just fine in the interpreter.
> Anyone have any ideas what I am overlooking?


Perhaps the user running apache is not allowed to kill the process...

Cheers,
Aloysio

>
> Cheers,
> Mark d.
>
> --
> http://mail.python.org/mailman/listinfo/python-list


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAda6x3Z98a+m7958RAoBSAJ9Jl2vkD5jfaaBncnAQqr gt3fPdUwCfTltv
ziZ0amH2LsqyNH7MsOa7PGk=
=Y/YJ
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Killing Tomcat Process In Eclipse IDE Anshuman Java 0 01-04-2005 12:22 PM
Control Panel Not loading, only when killing the asp_wp.exe process GregO ASP .Net 0 07-20-2004 03:56 PM
Killing and Starting IIS and a VB.Net process using ASP.Net Shruti A via .NET 247 ASP .Net 0 05-15-2004 10:54 AM
Process killing Michael Johnson Sr. ASP .Net 0 02-10-2004 03:29 PM
killing a process in ms windows - newbie Sting C Programming 2 12-29-2003 10:13 AM



Advertisments