JüRgen" "BöMmels <[EMAIL PROTECTED]> wrote:

> The standard filedescriptors stdin, stdout and stderr are protected
> from closing by the PMC_destroy function by marking them as
> PIO_F_SHARED. Don't know if this is a right solution.

The 3 standard IO PMCs should probably live inside interpreter->piodata
in a new *stdio_pmc[3] array.
During a DOD run, they would get marked active (as long as they have an
associated PIO structure, meaning PMC_data() != NULL).
Parrot_destroy then would do the right thing.

WRT closing/destroy: close sets PMC_data() = 0, destroy (and close) then
can check this. This code should just be the destroy() vtable in
ParrotIO, which also should reset the active_destroy flag.

leo

Reply via email to