in reply to Re^3: Perl file handles
in thread Perl file handles

Ah! that did work.

So, the idea is to close the DATA handle BEFORE you spawn the child, so the handle is not passed to it in the first place?

I was thinking you closed the handle between the child being spawned and the parent process closing. But then I assume the child would still have a pointer back to the originating file?

I am still unclear about how threading in perl works.

Replies are listed 'Best First'.
Re^5: Perl file handles
by ikegami (Patriarch) on Mar 06, 2009 at 21:09 UTC

    No, the idea is to close the DATA handle BEFORE you spawn the child in order to release the lock BEFORE the child tries to delete the file.

    I am still unclear about how threading in perl works.

    I don't see how this is relevant to this conversation.