From: Johan Malm Date: Fri, 15 Oct 2021 19:33:55 +0000 (+0100) Subject: config: survive parsing error X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f8e1d763332136b816f6e3f9d31e8ec8ca2d4370;p=proto%2Flabwc.git 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. --- 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);