http://www.perlmonks.org?node_id=11126857


in reply to Re: Detect whether a writeable filehandle has closed?
in thread Detect whether a writeable filehandle has closed?

Maybe an END block in the child could signal that the filehandle is gone

The child is not perl, it's a compiled C program.

  • Comment on Re^2: Detect whether a writeable filehandle has closed?

Replies are listed 'Best First'.
Re^3: Detect whether a writeable filehandle has closed?
by talexb (Chancellor) on Jan 14, 2021 at 14:43 UTC

    OK, so perhaps using the _atexit call (or whatever the equivalent is in your RTL) in the C code. The general idea is for the code to catch that the child has exitted and signal the caller.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.