I'm still a little worried about Webware running as a daemon.  I assign
a file-like class that doesn't write anything to sys.stdout and
sys.stderr, otherwise print statements will raise exceptions and
eventually Webware will run out of servlet threads or lose the main
thread.  I don't know why I'm the only person that has had a problem
with it, it should probably happen on all *nix systems.  The sys.stdout
fix solves the main problem but I still see exceptions printed when a
syntax error is introduced so if we are developing new servlet code we
have to be careful not to crash Webware if it's console was closed.  I'm
not sure why the Python import code is writing to it's own copy of
stdout/stderr instead of my silent version.

Any comments?  Can we add the silent stdout/stderr to CVS?  It works
well except for syntax errors.  Ideally a production server shouldn't
have syntax errors but Webware shouldn't rely on that.



Index: ThreadedAppServer.py
===================================================================
RCS file: /cvsroot/webware/Webware/WebKit/ThreadedAppServer.py,v
retrieving revision 1.47
diff -r1.47 ThreadedAppServer.py
627a628,635
>                               class BitBucket:
>                                       def flush(self):
>                                               pass
>                                       def write(self, s):
>                                               pass # nobody watches
>                               sys.stdout = BitBucket()
>                               sys.stderr = BitBucket()
>

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to