aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
Diffstat (limited to 'executor')
-rw-r--r--executor/common_bsd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/executor/common_bsd.h b/executor/common_bsd.h
index 0dcf6ff5f..652f3c660 100644
--- a/executor/common_bsd.h
+++ b/executor/common_bsd.h
@@ -280,9 +280,11 @@ static void sandbox_common()
// Some minimal sandboxing.
struct rlimit rlim;
-#ifndef GOOS_openbsd
+#ifdef GOOS_freebsd
// Documented bug in OpenBSD.
- // This causes frequent random aborts on netbsd. Reason unknown.
+ // This causes frequent random aborts. Reason unknown.
+
+ // This also causes ENOMEM on NetBSD during early init.
rlim.rlim_cur = rlim.rlim_max = 128 << 20;
setrlimit(RLIMIT_AS, &rlim);
#endif