summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/io.c b/io.c
index 0182042b39..b5553b5783 100644
--- a/io.c
+++ b/io.c
@@ -4913,9 +4913,9 @@ fptr_waitpid(rb_io_t *fptr, int nohang)
{
int status;
if (fptr->pid) {
- rb_last_status_clear();
- rb_waitpid(fptr->pid, &status, nohang ? WNOHANG : 0);
- fptr->pid = 0;
+ rb_last_status_clear();
+ rb_waitpid(fptr->pid, &status, nohang ? WNOHANG : 0);
+ fptr->pid = 0;
}
}
@@ -6433,11 +6433,11 @@ pipe_finalize(rb_io_t *fptr, int noraise)
#if !defined(HAVE_WORKING_FORK) && !defined(_WIN32)
int status = 0;
if (fptr->stdio_file) {
- status = pclose(fptr->stdio_file);
+ status = pclose(fptr->stdio_file);
}
fptr->fd = -1;
fptr->stdio_file = 0;
- rb_last_status_set(status, fptr->pid);
+ rb_last_status_set(fptr->pid, status, 0);
#else
fptr_finalize(fptr, noraise);
#endif