Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by jdporter (Paladin)
on Jan 14, 2021 at 14:51 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11126913]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found