Eric Ongerth wrote:
> Ok, found it... paster is hidden in a process that is reported as "/
> usr/bin/sh" when I do ps -ef.  Don't know why it does not die when I
> exit and close the shell window.  Not a problem, really, just a
> curiosity.  Anyway, very soon I'll have a real Linux box serving the
> project instead of faking it inside of my Windows workstation, and I'm
> sure a lot of things will be clearer then.

Mmm... I think I might know why.  The reloader starts in 
paste.script.serve:396, with subprocess.Popen(args, env=new_environ) -- 
it is trying to run a subprocess exactly like the original process, 
except with an environmental variable to signal to the subprocess that 
it shouldn't start the reloader.  Then when there's a reload the 
subprocess dies and the parent process starts it up again.

On unixy systems this starts up the subprocess directly.  Then if the 
parent process gets a signal, it passes it on to the subprocess.  This 
way kills work properly (before the signal got passed this zombie 
process problem happened on lot on unix systems too).  But the Windows 
subprocess module doesn't start a process directly, it uses a shell to 
start the subprocess.  So when a signal is sent to the (apparent) 
subprocess, it's going to the shell, and the shell doesn't pass it on to 
the real Paste process.

Oh, that and there aren't really signals in Windows anyway.  So... it 
doesn't work in a lot of ways.

Not running on Windows I don't really have a suggestion on how to fix 
this, but patches welcome ;)  The relevant code is pretty much all in 
that restart_with_monitor method in paste.script.serve.

   Ian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to