From 6fc7ccb41da5e9ec4357b40811ad740dd6a3b5b2 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 14 Oct 2015 09:56:03 +0200 Subject: erts: Only use forker StackAck on freebsd --- erts/emulator/sys/unix/erl_child_setup.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'erts/emulator/sys/unix/erl_child_setup.h') diff --git a/erts/emulator/sys/unix/erl_child_setup.h b/erts/emulator/sys/unix/erl_child_setup.h index 93b39d46b2..a28b136bfc 100644 --- a/erts/emulator/sys/unix/erl_child_setup.h +++ b/erts/emulator/sys/unix/erl_child_setup.h @@ -25,6 +25,14 @@ #include "sys.h" +#ifdef __FreeBSD__ +/* The freebsd sendmsg man page explicitly states that + you should not close fds before they are known + to have reached the other side, so this Ack protects + against that. */ +#define FORKER_PROTO_START_ACK 1 +#endif + #define FORKER_ARGV_NO_OF_ARGS 3 #define FORKER_ARGV_PROGNAME_IX 0 /* Program name */ #define FORKER_ARGV_MAX_FILES 1 /* max_files */ -- cgit v1.2.3