char *buf = NULL;
int ret = btr_exec_up(btrn, cmd, &buf);
- assert(ret >= 0);
+ if (ret < 0) {
+ /*
+ * This really should not happen. It means one of our parent
+ * nodes died unexpectedly. Proceed with fingers crossed.
+ */
+ PARA_CRIT_LOG("cmd %s: %s\n", cmd, para_strerror(-ret));
+ *result = 0;
+ return;
+ }
ret = para_atoi32(buf, result);
assert(ret >= 0);
free(buf);