Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Non-blocking Reads from Pipe Filehandle (WaitForMult...)

by ysth (Canon)
on Jun 13, 2007 at 22:33 UTC ( [id://621114]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Non-blocking Reads from Pipe Filehandle (WaitForMult...)
in thread Non-blocking Reads from Pipe Filehandle

Yes, I saw that, but didn't see an interface that allowed you to specify a handle. I found the doc a little confusing, both for Win32::IPC and its subclasses.
  • Comment on Re^3: Non-blocking Reads from Pipe Filehandle (WaitForMult...)

Replies are listed 'Best First'.
Re^4: Non-blocking Reads from Pipe Filehandle (Win32::IPC)
by tye (Sage) on Jun 13, 2007 at 22:47 UTC

    I assumed worst case was use of Win32API::File's GetOsFHandle().

    But diving into the XS code I see that the module is about as poorly designed as any. As is all too common for XS modules and Win32:: modules especially, it has way too much XS code that can only handle the very narrowest of types of input. *sigh* If you pass it an object that "isa" subclass of Win32::Process, then it will call the object's get_process_handle() method. If you pass it an object that "isa" subclass of Win32::IPC, then it expects that to be a ref to a scalar containing the integer handle value.

    So you could probably get away with something like:

    my $handle= bless \GetOsFHandle(*PIPE), "Win32::IPC";

    which is pretty ugly and likely to break at some future date.

    - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found