X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <5E25AF06EFB9EA4A87C19BC98F5C87531641A1 AT core-email DOT int DOT ascribe DOT com> <47AB31C7 DOT 3040909 AT cyconix DOT com> <47AB3B0B DOT 9060902 AT sbcglobal DOT net> <47AB4520 DOT 2050305 AT cyconix DOT com> <04d801c869b3$d97c8ce0$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <47AB4D05 DOT 2090207 AT cyconix DOT com> Subject: RE: Incomplete environ when running MinGW apps? Date: Thu, 7 Feb 2008 18:35:38 -0000 Message-ID: <04e101c869b8$3c90a330$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <47AB4D05.2090207@cyconix.com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 07 February 2008 18:25, Paul Leder wrote: > Dave Korn wrote: > >> Out of curiosity, what's the problem with just using system("...") >> always? > > I can't, because I need to redirect child I/O onto a socket, which > requires CreateProcess. The Unix code is (relatively) easy, but it's a > complete nightmare in Windoze. You have to use pipes as well as sockets, > it has to be multi-threaded, select doesn't work, and so on. > > I can use 'system' occasionally, but then I have the issues of > forward/backslashes, extra backslashes, quotes, and so on. I haven't > really got to the bottom of this. With CreateProcess I at least have the > option to use /bin/sh, if it exists, which makes life a little easier > (particularly for quote characters). Out of curiosity, what's the problem with just using popen("...") always? cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/