Patch to handle Win32 named pipes as file names

Stephen Cleary yjfwhhvvvhzk6wdy@hotmail.com
Wed May 5 02:36:00 GMT 2004


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/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: win32_pipe_patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20040505/1b8f07ce/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20040505/1b8f07ce/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fhandler_win32_pipe.cc
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20040505/1b8f07ce/attachment.cc>


More information about the Cygwin-patches mailing list