expunge_async: add comment about MacOS feasibility
Fixes
RELNOTES: none
@@ -152,6 +152,9 @@ public final class CleanCommand implements BlazeCommand {
// TODO(dmarting): Deactivate expunge_async on non-Linux platform until we completely fix it
// for non-Linux platforms (https://github.com/bazelbuild/bazel/issues/1906).
+ // MacOS and FreeBSD support setsid(2) but don't have /usr/bin/setsid, so if we wanted to
+ // support --expunge_async on these platforms, we'd have to write a wrapper that calls setsid(2)
+ // and exec(2).
if ((expungeAsync || async) && OS.getCurrent() != OS.LINUX) {
String fallbackName = expungeAsync ? "--expunge" : "synchronous clean";
env.getReporter()
