From 2c09110927084279a722068b5cd15cdda8a3d557 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Tue, 28 Aug 2018 13:37:22 +0200 Subject: [PATCH] [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. --- odoo/service/server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/service/server.py b/odoo/service/server.py index e8cf1da3b5d..f65494f4341 100644 --- a/odoo/service/server.py +++ b/odoo/service/server.py @@ -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