Ticket #2157 (new bug)

Opened 11 years ago

FileHandles aren't flushed and closed on program exit

Reported by: pmichaud Owned by:
Priority: normal Milestone:
Component: core Version: 3.5.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:


From discussion in parrot-dev, FileHandles are not automatically flushed and closed upon program exit.

    pmichaud at kiwi:~/nom$ cat fh.pir
    .sub 'main' :main
        $P0 = new ['FileHandle']
        $P1 = $P0.'open'('test.txt', 'w')
    pmichaud at kiwi:~/nom$ install/bin/parrot fh.pir
    pmichaud at kiwi:~/nom$ cat test.txt
    pmichaud at kiwi:~/nom$ ls -l test.txt
    -rw-r--r-- 1 pmichaud pmichaud 0 2011-07-17 09:57 test.txt

See the thread at  http://lists.parrot.org/pipermail/parrot-dev/2011-July/006013.html .


Note: See TracTickets for help on using tickets.