delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/05/22/11:31:38

Date: Thu, 22 May 1997 18:28:56 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "John M. Aldrich" <fighteer AT cs DOT com>
cc: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>,
DJGPP Workers Mailing List <djgpp-workers AT delorie DOT com>
Subject: Re: Bugfix for redir.c
In-Reply-To: <3383F9E2.2513@cs.com>
Message-ID: <Pine.SUN.3.91.970522182524.29094D-100000@is>
MIME-Version: 1.0

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...)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019