![]() |
killing process
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. |
Re: killing process
* Mark d. <mark@deverter.net> [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----- |
| All times are GMT. The time now is 12:18 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.