This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bugs: perl-libwin32-0.191-1 (Win32::Pipe->Connect) and using perl-5.8.2 open() to open an existing Win32 named pipe


I am currently writing an application that uses win32 named pipes to
communicate. The random length records being sent dictated opening
a file handle to the named pipe on the client and then using read()
to access the record. After noticing that libwin32-0.191 had been ported
to cygwin, I tried  a perl named pipe server and client that I had written
for debugging the app on ActiveState Perl-5.8.2. I noticed the following:

Win32::Pipe-Connect() is either non-blocking, doesn't get passed the timeout
value when the pipe is created or has a very low timeout value. This could
also be an interpretation problem. The behavior I had expected was that when
no client is connected, the Win32::Pipe-Connect() would wait for a client
to connect until a timeout occurs. The behavior I got was that Win32::Pipe->
Connect() returns immediately with "True" if a client is connected and "False"
if one has not.

Perl open() on the client side doesn't seem to understand using UNC to open
an existing named pipe. For example if I do the following:
open(PIPE, "<", "\\\\.\\pipe\\my named pipe"); I get an error
message:  "Mount device busy."  After trying to use open() to connect to the
named pipe, No other connections are possible. It would appear that open
is interpreting "\\\\.\\pipe\\my named pipe" as a mount request.

A perl script illustrating the problem is attached. Vital statistics are:
    Cygwin DLL version info:
        DLL version: 1.5.7
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 109
        Shared data: 3
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix: 
        Build date: Fri Jan 30 19:32:04 EST 2004
        CVS tag: cr-0x9e
        Shared id: cygwin1S3

and

perl                    5.8.2-1            
perl-libwin32           0.191-1            

Thanks in advance

Attachment: pipe_as_read_fh.pl
Description: Perl program

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]