summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-10 06:30:11 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-10 06:30:11 +0000
commit11930ca8ead99b308bdd70a2f8d1babda836e442 (patch)
tree7028a2272a7be9535e51b3cbba94318734827784 /io.c
parentc67a74570dd056569763f5015e0aafa7d454fca7 (diff)
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/io.c b/io.c
index 9abffb9519..43338dd274 100644
--- a/io.c
+++ b/io.c
@@ -1475,13 +1475,16 @@ pipe_finalize(fptr)
OpenFile *fptr;
{
#if !defined (__CYGWIN__)
+ extern VALUE rb_last_status;
+ int status;
if (fptr->f) {
- pclose(fptr->f);
+ status = pclose(fptr->f);
}
if (fptr->f2) {
- pclose(fptr->f2);
+ status = pclose(fptr->f2);
}
fptr->f = fptr->f2 = 0;
+ rb_last_status = INT2FIX(status);
#else
fptr_finalize(fptr);
#endif