OS X patch for run_erl.c

Sean Hinde sean.hinde@REDACTED
Sat Sep 13 19:35:17 CEST 2003


Hi,

The following patch to run_erl.c is required for Erlang to run in 
embedded mode under OS X. Without this patch run_erl fails to create 
the pipe in /tmp

Hopefully this will make it into R9C-1, but in the meantime here it is 
in case anyone else has encountered the problem and needs a fix now.

Regs,
Sean

[HugeMac:~/Desktop] sean% diff -u 
otp_src_R9C-0.orig/erts/etc/unix/run_erl.c 
otp_src_R9C-0/erts/etc/unix/run_erl.c
--- otp_src_R9C-0.orig/erts/etc/unix/run_erl.c  Mon Jul  7 13:01:10 2003
+++ otp_src_R9C-0/erts/etc/unix/run_erl.c       Sat Sep 13 18:26:53 2003
@@ -738,7 +738,11 @@
   */
  static int create_fifo(char *name, int perm)
  {
-  if ((mknod(name, S_IFIFO | perm, 0) < 0) && (errno != EEXIST))
+#ifdef HAVE_MACH_O_DYLD_H
+  if ((mkfifo(name, perm) < 0) && (errno != EEXIST))
+#else
+    if ((mknod(name, S_IFIFO | perm, 0) < 0) && (errno != EEXIST))
+#endif
      return -1;
    return 0;
  }




More information about the erlang-questions mailing list