[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Gawk 4.0.0 Exec's Weirdly
From: |
David Millis |
Subject: |
Re: [bug-gawk] Gawk 4.0.0 Exec's Weirdly |
Date: |
Sat, 1 Oct 2011 18:40:05 -0700 (PDT) |
> From: Eli Zaretskii <address@hidden>
> Date: Saturday, October 1, 2011, 3:58 AM
>
> If SHELL is set and points to a Unixy shell name,
> like "bash", Gawk will produce a temporary shell
> script with this content:
> bash -c WHATEVER
>
> Otherwise, it will produce a temporary batch file with this:
> address@hidden off
> cmd /c WHATEVER
>
> In both cases, the command that is actually run does not
> need any special handling or checks by Gawk
Oh, both contexts would have an external script. I thought you'd said:
SHELL) direct popen(SHELL, "WHATEVER")
No SHELL) external popen(CMD, "/c", "tmp.bat")
Okay then, temp scripts regardless.
CMD eats quotes whenever it gets fed an arg, even within a
batch. The batch above, would obfuscate the problem without
correcting anything.
@echo off
cmd /c "WHATEVER" "1" "2" "3"
would attempt to run
WHATEVER" "1" "2" "3
I think you meant
@echo off
"WHATEVER" "1" "2" "3"
without the leading CMD, which would exec as written.
David Millis