I use the mod_wsgi apache2 adapter for the django site, and I like to name some bash process in the view using regular
... p = subprocess.Popen("/home/example.com/restart-tomcat.sh", shell=True) sts = os.waitpid(p.pid, 0)[1] ...
This code works fine from a regular python shell, but does nothing (I can track right now) when called in django. Am I missing some wsgi restrictions? The script has 755 perm, so it must be executed.
Quick test
p = subprocess.Popen("date >> home/example.com/wsgi-test.txt", shell=True) sts = os.waitpid(p.pid, 0)[1]
shows that he doesn't even execute trivial commands. At the moment I am out of ideas and grateful for any contribution.
Thanks.
source share