This is the mail archive of the cygwin-patches@cygwin.com 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]

Patch to handle Win32 named pipes as file names


Attached is a patch, ChangeLog, and one new file that allows Cygwin programs to open Win32 named pipe instances (e.g., "\\.\pipe\pipename") through an open() call. The resulting handle will appear like a FIFO to the calling program.

This has nothing to do with mkfifo(), Unix-style pipes, or the (partial?) implementations of FH_PIPE, FH_PIPER, FH_PIPEW, or FH_FIFO already in CVS. All this patch does is allow, e.g.,
echo Howdy > //server/pipe/bob
assuming that a program running on 'server' has already opened a server-side named pipe with the name of 'bob'.


This is my first patch to Cygwin, so please let me know if I did anything wrong.

Notes:
- In general, I made the Win32 pipe act as much as possible as a Win32 file. Win32 pipes are part of the Win32 file system, so this should be correct, but not all behavior has been tested (e.g., getting/setting file security attributes).
- I am not familiar with device major/minor numbers, so I just chose major 0, minor 246 for Win32 named pipes.


-Steve

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/

Attachment: win32_pipe_patch
Description: Text document

Attachment: ChangeLog
Description: Text document

Attachment: fhandler_win32_pipe.cc
Description: Text document


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