[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] xenstored: do not redirect stderr to /dev/null


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Edwin Török <edvin.torok@xxxxxxxxxx>
  • Date: Wed, 25 Oct 2023 11:05:23 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Edwin Török <edwin.torok@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 25 Oct 2023 10:05:55 +0000
  • Ironport-data: A9a23:Eoovp6P4xHBu7hfvrR3Ll8FynXyQoLVcMsEvi/4bfWQNrUongjECn TFLUGiFbvuNM2D9fNt3aYWz/UIAvpeHzt9kTgto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CQ6jefQAOOkVIYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/nrRC9H5qyo42pA5AFmPJingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0rtUWmBKt scgEQIEXi6ht6Gxm7ipU+Y506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEOHwwNHwsYDUWUrsTIJ8yguauwGX4aTpbgFmUubA28y7YywkZPL3FaYCLJoHWGJoE9qqej nOcpUD1KzZZD42a0WOI+Ff22ciXpQquDer+E5Xnr6U30TV/3Fc7GBAQEFe2v/S9okq/QM5Eb VwZ/DI0qqo//1DtScPyNzWnpFaUsxhaXMBfe9DW8ynUlPCSuVzAQDFZH3geMLTKqfPaWxR39 QSIm5DSPQVduY2ra0Le8eyevyq9bH19wXA5WcMUcecUy4C98dFp1k6eH4gL/L2d1IOvRW+qq 9yehG1u3+9N0JRjO7CTpwivvt66mnTeoufZDC38WXis6ktCfJSkYYOzgbQwxa0bdNnAJrVtU WJtpiR/0AztJcvU/MB1aL9RdIxFHt7cWNEmvXZhHoM66xOm8GO5cIZb7VlWfRk4Yp9bI2W0M RSD5Gu9AaO/2lPwM8ebhKroVqwXIVXIT4y5Bpg4kPIVCnSOSON31H43PhPBt4wcuEMtjbs+K f+mTCpYNl5DUf4P5GPvG48gPUoDmnhWKZX7GcqqkHxKENO2OBaodFvyGALQNLhivPvf+V69H hQ2H5Li9iizmdbWOkH/mbP/53hQRZTnLfgac/BqS9M=
  • Ironport-hdrordr: A9a23:qbtXQK2Wqqw4HmfYXaOvtgqjBLYkLtp133Aq2lEZdPUCSL39qy nOppQmPHDP4wr5NEtLpTniAsi9qBHnmqKdurNhWItKNTOO0FdASrsO0WKI+VPd8kPFmtK0es 1bAs9D4HGbNykYsS5aijPIceod/A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Edwin Török <edwin.torok@xxxxxxxxx>

By default stderr gets redirected to /dev/null because oxenstored daemonizes 
itself.
This must be a left-over from pre-systemd days.

In ee7815f49f ("tools/oxenstored: Set uncaught exception handler") a workaround 
was added to log exceptions
directly to syslog to cope with standard error being lost.

However it is better to not lose standard error (what if the connection to 
syslog itself fails, how'd we log that?),
and use the '--no-fork' flag to do that.
This flag is supported by both C and O versions of xenstored.

Both versions also call sd_notify so there is no need for forking.

Leave the default daemonize as is so that xenstored keeps working on non-Linux 
systems as before.

Signed-off-by: Edwin Török <edwin.torok@xxxxxxxxx>
---
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in 
b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
index 433e4849af..09a1230cee 100644
--- a/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
+++ b/tools/hotplug/Linux/init.d/sysconfig.xencommons.in
@@ -52,7 +52,7 @@
 # like "--trace-file @XEN_LOG_DIR@/xenstored-trace.log"
 # See "@sbindir@/xenstored --help" for possible options.
 # Only evaluated if XENSTORETYPE is "daemon".
-XENSTORED_ARGS=
+XENSTORED_ARGS=--no-fork
 
 ## Type: string
 ## Default: Not defined, tracing off
-- 
2.41.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.