Mail Archives: djgpp-workers/1997/05/22/11:31:38
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 -