[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Inconsistent External Command Spawning
From: |
David Millis |
Subject: |
Re: [bug-gawk] Inconsistent External Command Spawning |
Date: |
Sat, 22 Jun 2013 21:32:08 -0700 (PDT) |
On Sat, 6/22/13, Eli Zaretskii <address@hidden> wrote:
>> Using Klabaster's binaries, which I think are built from canonical source.
>> 4.1.0: Pipe:Quotes, System:Bat
>> 4.0.1: Pipe:Bat, System:Bat
> This cannot be true, because nothing's changed in Gawk on Windows
> wrt pipes and system between 4.0.1 and 4.1.0.
Bizarre.
Canonical /pc/popen.c source indeed hasn't changed at all from 4.0.1 to 4.1.0.
When __MINGW32__ is defined, both os_system() and os_popen() both call
scriptify().
Hex editing Klabaster's 4.1.0 binary reveals the string "scriptify" in it,
suggesting shared code, but behavior in that series HAS changed between
versions...
- - -
BEGIN {
# Batch will remove %1. Quote will print as is (no quote chars at risk of
being eaten in this test).
command = "ECHO x%1x";
print "System";
system(command);
print "";
print "Pipe";
command | getline tmp;
print tmp;
close(command);
}
- - -
G:\>gawk410 -f exec_test.txt
System
xx
Pipe
x%1x
G:\>gawk401 -f exec_test.txt
System
xx
Pipe
xx
- - -
0.o
Sanity Check: Do your builds do this?
David