Closed mattste closed 2 years ago
@mattste, could you check the latest commit? I implemented fallback to pipe(2) for MacOS, but don't have a Mac to test it on.
It fails on my mac with:
===> Compiling /Users/edward/Documents/src/elixir/tpb_sys/deps/erlexec/c_src/exec.cpp
===> /Users/edward/Documents/src/elixir/tpb_sys/deps/erlexec/c_src/exec.cpp:211:10: error: no matching function for call to 'set_cloexec_flag'
if (!set_cloexec_flag(sigchld_pipe, true)) {
^~~~~~~~~~~~~~~~
c_src/exec.hpp:370:9: note: candidate function not viable: no known conversion from 'int [2]' to 'int' for 1st argument
bool set_cloexec_flag(int fd, bool value);
^
1 error generated.
I'm running into an error when compiling the latest erlexec on master.
Error Message
Possible Fix
This appears to be caused by the transition to
pipe2
in https://github.com/saleyn/erlexec/commit/95a654be22a3c2aa6ba9daa7b5e4f041a5d0b9e9. It appearspipe2
is not available on Mac OS. Perhaps we could fallback topipe
whenpipe2
is not available? Another project ran into this issue.System Information
Operating System: macOS Big Sur version 11.5.2 (20G95)