Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by jdporter (Canon)
on Jan 14, 2021 at 14:51 UTC ( #11126913=note: print w/replies, xml ) Need Help??


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

Thank you. In fact, I had already tried the kill 0 technique, and it didn't work, just as you described.

I'm going to try the /proc/$pid method. But I'm afraid that that might also yield a false negative if I haven't reaped the child yet. (ps shows "defunct".) (I suspect that that would also explain why kill 0 doesn't do what we expect either.)

Replies are listed 'Best First'.
Re^3: Detect whether a writeable filehandle has closed?
by shmem (Chancellor) on Jan 14, 2021 at 15:10 UTC
    (ps shows "defunct".)

    You need waitpid to reap the zombie.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11126913]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2021-04-21 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?