[svn:parrot] r39850 - in branches/io_cleanups/src: io pmc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Tue Jun 30 22:20:45 UTC 2009
Author: whiteknight
Date: Tue Jun 30 22:20:45 2009
New Revision: 39850
URL: https://trac.parrot.org/parrot/changeset/39850
Log:
[io_cleanups] add a child PIOHANDLE to PipeHandle PMC, to keep track of a child process that is attached to the pipe.
Modified:
branches/io_cleanups/src/io/api.c
branches/io_cleanups/src/pmc/pipehandle.pmc
Modified: branches/io_cleanups/src/io/api.c
==============================================================================
--- branches/io_cleanups/src/io/api.c Tue Jun 30 21:37:59 2009 (r39849)
+++ branches/io_cleanups/src/io/api.c Tue Jun 30 22:20:45 2009 (r39850)
@@ -1040,7 +1040,6 @@
return VTABLE_get_integer(interp, pmc);
}
-
/*
=back
Modified: branches/io_cleanups/src/pmc/pipehandle.pmc
==============================================================================
--- branches/io_cleanups/src/pmc/pipehandle.pmc Tue Jun 30 21:37:59 2009 (r39849)
+++ branches/io_cleanups/src/pmc/pipehandle.pmc Tue Jun 30 22:20:45 2009 (r39850)
@@ -27,6 +27,7 @@
pmclass PipeHandle extends Handle {
ATTR INTVAL reader;
ATTR INTVAL writer;
+ ATTR PIOHANDLE child;
/*
@@ -45,6 +46,7 @@
PMC_data(SELF) = attrs;
attrs->reader = 0;
attrs->writer = 0;
+ attrs->child = PIO_INVALID_HANDLE;
attrs->os_handle = PIO_INVALID_HANDLE;
PObj_active_destroy_SET(SELF);
@@ -85,8 +87,10 @@
if (PARROT_PIPEHANDLE(SELF)) {
Parrot_PipeHandle_attributes *data_struct = PARROT_PIPEHANDLE(SELF);
- if(data_struct->os_handle != PIO_INVALID_HANDLE)
+ if (data_struct->os_handle != PIO_INVALID_HANDLE)
Parrot_io_close_piohandle(interp, data_struct->os_handle);
+ if (data_struct->child != PIO_INVALID_HANDLE)
+ Parrot_io_close_piohandle(interp, data_struct->child);
data_struct->os_handle = PIO_INVALID_HANDLE;
}
}
More information about the parrot-commits
mailing list