Date: Thu, 1 Nov 2001 15:45:06 +0000 From: Robin Becker <robin@jessikat.fsnet.co.uk> To: questions@freeBSD.ORG Subject: cgi started background process Message-ID: <5ClPHFBC4W47Ewyh@jessikat.demon.co.uk>
next in thread | raw e-mail | index | archive | help
I'm running apache with freeBSD 4.4 release. I'm using a python cgi script and wish to get this script to start a background job. The start script is wrapped to be a user other than nobody. My invocation of the background process cmd = 'nohup detach python script.py XXX \'ARGS\' > ./nohup.out 2>&1' system(cmd) and certainly control returns to the starting cgi script which resumes and finishes as expected. Also the bg script.py process seems to start and works well. On our test machine which runs 4.4 the job seems to complete normally, but on the colo machine which runs 4.1.1-stable the jobs seem to get mysteriously killed. We don't see the final outputs etc and there is no error info in nohup.out. I am unable to use ps properly as it won't let me see -x or -a properly (presumably for security reasons). Is the above command a reasonable way to start up a detached process? is the process safe from culling by apache when the apache thread suicides after performing a certain number of requests? -- Robin Becker To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5ClPHFBC4W47Ewyh>