[FIX] server: ensure that the error message is flushed
When Odoo intercept the SIGXCPU signal, an error message is written to the stderr. Unfortunately, if stderr is redirected to a buffered file, the message will not appear.
This commit is contained in:
@@ -208,6 +208,7 @@ class ThreadedServer(CommonServer):
|
||||
raise KeyboardInterrupt()
|
||||
elif sig == signal.SIGXCPU:
|
||||
sys.stderr.write("CPU time limit exceeded! Shutting down immediately\n")
|
||||
sys.stderr.flush()
|
||||
os._exit(0)
|
||||
elif sig == signal.SIGHUP:
|
||||
# restart on kill -HUP
|
||||
|
||||
Reference in New Issue
Block a user