> On Tue, Jan 24, 2012 at 12:06 AM, Roberto De Ioris <[email protected]> > wrote: >>> On Mon, Jan 23, 2012 at 3:09 AM, Roberto De Ioris <[email protected]> >>> wrote: >>> >>> when stepping the code, Py_IsInitialized() does return true, but deep >>> within python routines threadstate_getframe receives (and tries to >>> dereference) a null pointer. >>> >>> > > ... which loops forever until killed. if --pyshell was "oneshot", you > could pipe an initialization script into uWSGI, execute it, let the > hijacked worker die, then respawn as a regular worker ... this might > be useful for other scenarios too. > > so ... removing uWSGI handlers and only giving the hijacked worker one > life == no unbound looping, a neat way to pipe commands into uWSGI, > and clean shutdown in all cases i can think of. > > thoughts? > >
I like the idea of piping code to the pyshell and soon after restore the process in normal worker mode. I have added the --pyshell-oneshot option I have added code for restoring terminal settings if the pyshell dies, this should avoid clobbered terminals/screen too In non-oneshot mode, the pyshell will continue to respawn after a pipe code injection. To avoid that we should make an ultra-complex dance with file descriptors. As i do not see reason to use --pyshell with piped code, i will leave the implementation as is. If in the feature someone came up with an idea requiring that i will investigate furhter. For now the official answer is "use --pyshell-oneshot to pipe code" Many thanks for your support. -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
