Date: Thu, 22 May 1997 18:28:56 +0300 (IDT) From: Eli Zaretskii To: "John M. Aldrich" cc: Robert Hoehne , DJGPP Workers Mailing List Subject: Re: Bugfix for redir.c In-Reply-To: <3383F9E2.2513@cs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 22 May 1997, John M. Aldrich wrote: > Hmm... I just thought of something: I didn't check to make sure that > arguments enclosed in single or double quotes are handled correctly by > the redir code. It might be worthwhile to check this out, although it > probably also applies to spawn*() as well as system(). No, arguments passed by `spawn' aren't expanded on the child's side, so it's only an issue for `system'. But your patch will indeed fail when the original arguments were quoted. You need to quote the arguments which include special characters and whitespace when you reconstruct the command line before calling `system'. (After you are through it, you might read the messy code on dosexec.c that handles it and smile. Or maybe read it *before* handling the quoting, so you get a few ideas...)