platform/shared/ruby/process.c in rhodes-7.1.17 vs platform/shared/ruby/process.c in rhodes-7.4.1

- old
+ new

@@ -299,11 +299,11 @@ /* We should not have reserved FDs at this point */ if (rb_reserved_fd_p(fd)) { /* async-signal-safe */ rb_async_bug_errno("BUG timer thread still running", 0 /* EDOOFUS */); return 0; } - return fpclose(fd); /* async-signal-safe */ + return close(fd); /* async-signal-safe */ } /*#define DEBUG_REDIRECT*/ #if defined(DEBUG_REDIRECT) @@ -392,12 +392,12 @@ ttyprintf("parent_close(%d) => %d\n", fd, ret); return ret; } #else -#define redirect_dup(oldfd) fpdup(oldfd) -#define redirect_dup2(oldfd, newfd) fpdup2((oldfd), (newfd)) +#define redirect_dup(oldfd) dup(oldfd) +#define redirect_dup2(oldfd, newfd) dup2((oldfd), (newfd)) #define redirect_cloexec_dup(oldfd) rb_cloexec_dup(oldfd) #define redirect_cloexec_dup2(oldfd, newfd) rb_cloexec_dup2((oldfd), (newfd)) #define redirect_close(fd) close_unless_reserved(fd) #define parent_redirect_open(pathname, flags, perm) rb_cloexec_open((pathname), (flags), (perm)) #define parent_redirect_close(fd) close_unless_reserved(fd) @@ -414,11 +414,11 @@ */ static VALUE get_pid(void) { - return PIDT2NUM(fpgetpid()); + return PIDT2NUM(getpid()); } /* * call-seq: @@ -1257,13 +1257,13 @@ return -1; } envp = envp_str ? (char **)RSTRING_PTR(envp_str) : NULL; if (envp_str) - fpexecve(prog, argv, envp); /* async-signal-safe */ + execve(prog, argv, envp); /* async-signal-safe */ else - fpexecv(prog, argv); /* async-signal-safe (since SUSv4) */ + execv(prog, argv); /* async-signal-safe (since SUSv4) */ preserving_errno(try_with_sh(prog, argv, envp)); /* try_with_sh() is async-signal-safe. */ return -1; #endif } @@ -3043,10 +3043,10 @@ } #endif if (eargp->umask_given) { mode_t mask = eargp->umask_mask; - mode_t oldmask = fpumask(mask); /* never fail */ /* async-signal-safe */ + mode_t oldmask = umask(mask); /* never fail */ /* async-signal-safe */ if (sargp) { sargp->umask_given = 1; sargp->umask_mask = oldmask; } }