Message-ID: <338492EF.FDD@cs.com> Date: Thu, 22 May 1997 18:41:47 +0000 From: "John M. Aldrich" Reply-To: fighteer AT cs DOT com Organization: Two pounds of chaos and a pinch of salt MIME-Version: 1.0 To: Eli Zaretskii CC: Robert Hoehne , DJGPP Workers Mailing List Subject: Re: Bugfix for redir.c References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > > 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...) Interesting. This code would have to deal with such things as nested quotes, escaped quotes, and other such nastiness. For example, it would have to reconstruct the argument 'He said "This is great"' with single quotes instead of double quotes, or the command line will be even more messed up than it was before. This is probably why dosexec.c is so messy. ;) I'll take a look at it and see what I can come up with. In the meantime, if anyone really does want to mess with the internal mechanics of the command-line passing system used by DJGPP programs, you're welcome to it. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com | | Descent 2: The Infinite Abyss - The greatest Internet game of all | | time just got better! This time, you're going all the way down...| ---------------------------------------------------------------------