From: dahms@ifk20.mach.uni-karlsruhe.de
Subject: Re: _get_osfhandle and/or mmap under cygwin.dll on NT?
14 Jan 1997 14:27:45 -0800
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <009AE5F1.4C404340.7192.cygnus.gnu-win32@ifk20.mach.uni-karlsruhe.de>
Original-To: jra@cygnus.com
Original-CC: gnu-win32@cygnus.com, dahms@ifk20.mach.uni-karlsruhe.de
Original-Sender: owner-gnu-win32@cygnus.com

Hi Jeremy, you wrote:

: 	I have implemented mmap and get_osfhandle
: in the latest cygwin32 sources (they seem to work).
: The tricky thing about mmap is that according to
: POSIX the mmap'ed areas must be copied across a
: fork() - that complicates the implementation.

I need the following under NT, which works under HP-UX, Linux and
DECunix/Alpha, for a shared buffer allowing the parent writing to all it's
childs. That means the contents of the buffer can't be copied just once!
 
            if (buf = mmap(NULL, some_size,
                        PROT_READ | PROT_WRITE,
#ifdef MAP_VARIABLE
                        MAP_VARIABLE |
#endif
                        MAP_ANONYMOUS | MAP_SHARED,
                        -1, 0)) == (caddr_t) -1) {
		/* error handled here */
	    }
#endif


Bye, Heribert (dahms@ifk20.mach.uni-karlsruhe.de)
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
