Skip to content

Commit cab124d

Browse files
committed
Don't allocate OCaml exceptions in Windows fork actions
1 parent 393ec68 commit cab124d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib_eio/unix/fork_action.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ CAMLprim value eio_unix_fork_execve(value v_unit) {
7171

7272
static void action_fchdir(int errors, value v_config) {
7373
#ifdef _WIN32
74-
uerror("Unsupported operation on windows", Nothing);
74+
eio_unix_fork_error(errors, "action_fchdir", "Unsupported operation on windows");
7575
#else
7676
value v_fd = Field(v_config, 1);
7777
int r;
@@ -103,7 +103,7 @@ CAMLprim value eio_unix_fork_chdir(value v_unit) {
103103

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

124124
static void set_cloexec(int errors, int fd, int cloexec) {
125125
#ifdef _WIN32
126-
uerror("Unsupported operation on windows", Nothing);
126+
eio_unix_fork_error(errors, "set_cloexec", "Unsupported operation on windows");
127127
#else
128128
int r = fcntl(fd, F_GETFD, 0);
129129
if (r != -1) {

0 commit comments

Comments
 (0)