Re: SCGIServer and unusal termination

2009-11-20 Thread Eden Kirin
Дамјан Георгиевски wrote: SCGIServer().serve() forks, so it seems that there are 2 python processes continuing to run after SCGIServer().serve() I noticed that which makes it unusable to me. Also, it took me almost whole day to realize this. I'm adopting a huge application to work with SCGI

Re: SCGIServer and unusal termination

2009-11-20 Thread Дамјан Георгиевски
> everything works just fine, but one thing bothers me. All prints after > try-except block are executed twice after the Ctrl+C is pressed! > > test.py: > #- > from scgi.scgi_server import SCGIServer > > n = 0 > print "Starting server." > > try: > SCGIServer().serve(

Re: SCGIServer and unusal termination

2009-11-20 Thread Eden Kirin
Diez B. Roggisch wrote: - save a reference to sys.stdout *before* invoking the server - compare to it after interruption. If it has changed, you at least know that somebody messed with it, and can beat him or whatever you see fit. Thanks for the help. Finally, I dropped python-scgi module an

Re: SCGIServer and unusal termination

2009-11-17 Thread Diez B. Roggisch
Eden Kirin wrote: > Diez B. Roggisch wrote: > >>> Is there some reasonable explanation for this behaviour? Thanks in >>> advance. >> >> I can only guess that SCGIServer does something to stdout. Your code >> isn't executed twice, so the doubling seems to come from writing it >> twice. > > Yes I

Re: SCGIServer and unusal termination

2009-11-17 Thread Eden Kirin
Diez B. Roggisch wrote: Is there some reasonable explanation for this behaviour? Thanks in advance. I can only guess that SCGIServer does something to stdout. Your code isn't executed twice, so the doubling seems to come from writing it twice. Yes I know that code isn't executed twice since

Re: SCGIServer and unusal termination

2009-11-17 Thread Diez B. Roggisch
Eden Kirin wrote: > Hi there, > > I'm playing with SCGIServer > (http://vmlinux.org/cgi-bin/dwww/usr/share/doc/python-scgi/guide.html), > everything works just fine, but one thing bothers me. All prints after > try-except block are executed twice after the Ctrl+C is pressed! > > test.py: > #

Re: SCGIServer and unusal termination

2009-11-16 Thread Eden Kirin
Anyone? -- www.vikendi.net -/- www.supergrupa.com -- http://mail.python.org/mailman/listinfo/python-list

SCGIServer and unusal termination

2009-11-16 Thread Eden Kirin
Hi there, I'm playing with SCGIServer (http://vmlinux.org/cgi-bin/dwww/usr/share/doc/python-scgi/guide.html), everything works just fine, but one thing bothers me. All prints after try-except block are executed twice after the Ctrl+C is pressed! test.py: #- from scgi.