From f8e1d763332136b816f6e3f9d31e8ec8ca2d4370 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Fri, 15 Oct 2021 20:33:55 +0100 Subject: [PATCH] config: survive parsing error It is no good crashing on an rc.xml syntax error, particularly on a SIGHUP when the user could have applications open. --- src/config/rcxml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/rcxml.c b/src/config/rcxml.c index c9933d51..ed59b8de 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -383,8 +383,8 @@ rcxml_parse_xml(struct buf *b) { xmlDoc *d = xmlParseMemory(b->buf, b->len); if (!d) { - wlr_log(WLR_ERROR, "xmlParseMemory()"); - exit(EXIT_FAILURE); + wlr_log(WLR_ERROR, "error parsing config file"); + return; } xml_tree_walk(xmlDocGetRootElement(d)); xmlFreeDoc(d);