Hi,
on my web2py application on windows, I have a cron task that runs for a long time. I noticed a new process is spawned for every cron job.. If the main web2py process exists (for example if I try to terminate the process, or close the web2py window), it will not exit until the cron process is finished (is it waiting for the child processes to finish?). Am I right, or do I get something wrong?
So my question is, Is there a way to detect from the cron process that the main web2py process is exiting, in order to finish inmediately, but clean? I thought of using the getppid() from the cron process for getting the parent process id, but it is not available on windows. Could the main web2py process send a "terminate" or "interrupt" signal or similar to the still running cron processes? This way the process would be killed, or could trap the signal and exit cleanly.
Thanks very much.