Print debug message if a namespace test fails

This commit is contained in:
Eelco Dolstra 2023-02-07 23:01:39 +01:00
parent c5c0617d6f
commit 0a70b411e1

View file

@ -39,7 +39,12 @@ bool userNamespacesSupported()
_exit(res ? 1 : 0);
});
return pid.wait() == 0;
bool supported = pid.wait() == 0;
if (!supported)
debug("user namespaces do not work on this system");
return supported;
}();
return res;
}
@ -56,7 +61,12 @@ bool mountNamespacesSupported()
_exit(res ? 1 : 0);
});
return pid.wait() == 0;
bool supported = pid.wait() == 0;
if (!supported)
debug("mount namespaces do not work on this system");
return supported;
}();
return res;
}