]> git.mdlowis.com Git - proto/labwc.git/commitdiff
config: survive parsing error
authorJohan Malm <jgm323@gmail.com>
Fri, 15 Oct 2021 19:33:55 +0000 (20:33 +0100)
committerJohan Malm <jgm323@gmail.com>
Fri, 15 Oct 2021 19:33:55 +0000 (20:33 +0100)
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

index c9933d51992c98a6ebab632e5bb3f1e6098dc1f1..ed59b8de2de038dc144936a3d7e8055c3314705f 100644 (file)
@@ -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);