From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 889 invoked by alias); 12 Apr 2006 07:52:55 -0000 Received: (qmail 881 invoked by uid 22791); 12 Apr 2006 07:52:55 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Apr 2006 07:52:53 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-233-86.inter.net.il [83.130.233.86]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id DYW39692 (AUTH halo1); Wed, 12 Apr 2006 10:52:45 +0300 (IDT) Date: Wed, 12 Apr 2006 07:52:00 -0000 Message-Id: From: Eli Zaretskii To: Jim Blandy CC: gdb-patches@sources.redhat.com In-reply-to: (message from Jim Blandy on Wed, 12 Apr 2006 00:04:44 -0700) Subject: Re: RFA: Add 'target |' support for MinGW Reply-to: Eli Zaretskii References: X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00146.txt.bz2 > From: Jim Blandy > Date: Wed, 12 Apr 2006 00:04:44 -0700 > > src/gdb/ChangeLog: > 2006-04-11 Jim Blandy > > Add support for 'target remote |' on MinGW. > * ser-mingw.c (struct pipe_state): New structure. > (make_pipe_state, free_pipe_state, cleanup_pipe_state) > (pipe_windows_open, pipe_windows_close, pipe_windows_read) > (pipe_windows_write, pipe_wait_handle): New functions. > (_initialize_ser_windows): Register a "pipe" interface based on > them. Thanks. > + const char *err_msg > + = pex_run (ps->pex, PEX_SEARCH | PEX_BINARY_INPUT | PEX_BINARY_OUTPUT, > + argv[0], argv, NULL, NULL, > + &err); > [...] > + DWORD bytes_read; > + if (! ReadFile (pipeline_out, scb->buf, count, &bytes_read, NULL)) > + return -1; > [...] > + DWORD written; > + if (! WriteFile (pipeline_in, buf, count, &written, NULL)) > + return -1; Do we really want binary I/O in _all_ situations? Can it be that, depending on the command on the other side of the pipe, someone would like the CR characters to be stripped from the EOLs in the incoming stuff? The way you wrote it, AFAICS, binary I/O is always used, no matter what.