Did you try running the snippet I posted above?
Here it is as a one-liner in case you couldn't see how to run it. (You'll need to enter it as a single line.)
C:\test>perl -MPOSIX=:sys_wait_h
-le"$pid=open O, q[perl -esleep(10)|];print waitpid $pid,&WNOHANG whil
+e sleep 1"
0
0
0
0
0
0
0
0
0
3204
-1
-1
Terminating on signal SIGINT(2)
You'll need ^C to terminate it. What results did you see?
If you can eliminate your installation and platform as a source of the problem, then you might look more closely at your implementation. Maybe post a bit more code? Including the open as I requested?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|