Дамјан Георгиевски 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
> 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(
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
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
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
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:
> #
Anyone?
--
www.vikendi.net -/- www.supergrupa.com
--
http://mail.python.org/mailman/listinfo/python-list
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.