I'm obtaining a PID, using python, of a CGI script, however, the PID is not valid i.e. can't Taskkill it from CL.  I get:
"Process: no process found with pid xxxx" where xxxx is the pid
I thought maybe I have to kill a parent python shell instance, but os.ppid doesn't work in windows.
So then I installed psutil python module and can now get parent PID, but it just shows the parent as the actual WebServer (Abyss), which I don't think I want to kill, since it is the http process that I notice runs constantly and not just a CGI interpreter instance.
Using psutil I CAN get the process status of the actual script, using the pid returned by os.getpid(), and see that it is running.  So the pid works for purposes of process information retrieval using psutil.  But this gets me no further to obtaining the actual PID I need to kill the script, using EITHER Taskkill on the CL or via kill() from psutil!
What exactly is a cgi shell script from a process perspective, and if it is not a process, why is os.getpid() returning a pid?
Why are you assured that your CGI script are still working when you try to kill it?  Web server starts one instance of CGI script for one request and when script finishes it... just finishes.
Determing PID of CGI Script on Windows