Skip to content

Commit

Permalink
Don't allocate OCaml exceptions in Windows fork actions
Browse files Browse the repository at this point in the history
  • Loading branch information
patricoferris committed May 8, 2023
1 parent 393ec68 commit b56dfe3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib_eio/unix/fork_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ CAMLprim value eio_unix_fork_execve(value v_unit) {

static void action_fchdir(int errors, value v_config) {
#ifdef _WIN32
uerror("Unsupported operation on windows", Nothing);
eio_unix_fork_error(errors, "action_fchdir", "Unsupported operation on windows");
#else
value v_fd = Field(v_config, 1);
int r;
Expand Down Expand Up @@ -103,7 +103,7 @@ CAMLprim value eio_unix_fork_chdir(value v_unit) {

static void set_blocking(int errors, int fd, int blocking) {
#ifdef _WIN32
uerror("Unsupported operation on windows", Nothing);
eio_unix_fork_error(errors, "set_blocking", "Unsupported operation on windows");
#else
int r = fcntl(fd, F_GETFL, 0);
if (r != -1) {
Expand All @@ -123,7 +123,7 @@ static void set_blocking(int errors, int fd, int blocking) {

static void set_cloexec(int errors, int fd, int cloexec) {
#ifdef _WIN32
uerror("Unsupported operation on windows", Nothing);
eio_unix_fork_error(errors, "set_cloexec", "Unsupported operation on windows");
#else
int r = fcntl(fd, F_GETFD, 0);
if (r != -1) {
Expand Down

0 comments on commit b56dfe3

Please sign in to comment.