GSoC/GCI Archive
Google Code-in 2010 Parrot Foundation and The Perl Foundation

Fix FileHandle clone

completed by: Nagato Yuki

mentors: whiteknight

Task description: Parrot's FileHandle PMC type defines a clone VTABLE, but the implementation is highly suspect and is likely a source of bugs. The clone VTABLE creates a new FileHandle PMC and creates a raw copy of the OS handle object. It does not copy over any other details (I don't know if these would all be needed). This is probably very bad.

The clone VTABLE should create a proper duplicate of the underlying OS handle and copy over any additional information that a copy would need. It is up to the student to decide what all those details should be.

Also, write a test for the new behavior.