diff --git a/io.c b/io.c index 43338dd274..d5701dcb8a 100644 --- a/io.c +++ b/io.c @@ -1484,6 +1484,9 @@ pipe_finalize(fptr) status = pclose(fptr->f2); } fptr->f = fptr->f2 = 0; +#if defined DJGPP || (defined NT && !defined __BORLANDC__) + status <<= 8; +#endif rb_last_status = INT2FIX(status); #else fptr_finalize(fptr);