in reply to Win32::Pipe, how to tell if the other side went away?

I'm shooting in the dark here, but have you tried using the GetInfo() method?

According to the module's documentation:
GetInfo() Retrieves an array of information about the pipe: Element 0: State of Pipe Element 1: Number of instances the pipe has Element 2: Name of user connected as the client Element 3: Max number of bytes collected before the pipe sends the + data Element 4: Max amount of time before data is sent
I guess Element 0 there should provide something useful. Other than this, I can't provide any further help, sorry.

Just a side note, but I never really got it why Roth Consulting's modules aren't on the CPAN.


acid06
perl -e "print pack('h*', 16369646), scalar reverse $="

Replies are listed 'Best First'.
Re^2: Win32::Pipe, how to tell if the other side went away?
by BrowserUk (Patriarch) on Feb 15, 2006 at 00:46 UTC

    Unfortunately, that 'state' field is bit encoded and can indicate blocking/non-blocking, and byte/message mode which doesn't help unless you can enable non-blocking mode and I don't think that module exposes that to Perl.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.