Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3B0D265D.B4F896FF@reversion.ca> Date: Thu, 24 May 2001 09:18:53 -0600 From: Craig Nelson X-Mailer: Mozilla 4.08 [en] (X11; I; SunOS 5.8 i86pc) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygwin_attach_handle_to_fd() References: <3B0C35D4 DOT 5B3849D0 AT reversion DOT ca> <20010523192540 DOT A15862 AT redhat DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Christopher Faylor wrote: > 'name' is the name of the file or device. > 'bin' is true if the file should be opened in binary mode, false for text mode. > 'access' is a windows setting like 'GENERIC_READ' or 'GENERIC-WRITE'. I dont understand why you would need to pass "name". isnt the point of this function to simply attach the "int fd" to an already opened HANDLE? In my case, HANDLE is merely a result of CreatePipe() so there is no device name. is it safe to pass NULL? > It sounds like you're reinventing "popen" to me. Yes, it's very close.. the bad thing about popen is that you only get one pipe and it is not bidirectional. I was using the usual fork(), exec() way of life, but it seems to give me loads of grief. I've switched to using CreateProcess() and the grief goes away (except for this little problem I'm having here). I'll try some new things here and post my findings.. > > Probably the best thing you could do is inspect the source code. That's > what I just did. looking through there now.. but still unclear on "name".. Do you know the impact of using it with an already open handle? ie: can I just set "name" to NULL? Thanks again for any input. Craig Nelson, Cameo Systems Inc. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple