[Bug ada/20075] Bug in GNAT.Expect.Non_Blocking_Spawn

ludovic dot brenta at insalien dot org gcc-bugzilla@gcc.gnu.org
Sun Feb 20 23:07:00 GMT 2005

------- Additional Comments From ludovic dot brenta at insalien dot org  2005-02-20 17:14 -------
Hi Stefan,

I've given some more thought to the problem, and I think that perhaps
the bug is in Ada.Command_Line.Command_Name, not in GNAT.OS_Lib or
GNAT.Expect.  Indeed, it is Ada.Command_Line.Command_Name that
truncates argv[0] at the first space, isn't it?  And this is wrong,
because even the basename of the program may have spaces in it.

To demonstrate this, I renamed "show_params" to "show params" and
amended launcher.adb accordingly:

$ gnatmake -o "show params" show_params.adb
$ gnatmake launcher.adb
$ PATH=$(pwd) ./launcher
via GNAT.OS_Lib.Spawn:
show params
via GNAT.Expect.Non_Blocking_Spawn:
/home/lbrenta/src/ada/tmp/ada 20075/show params

Could you try that on Windows in a path that does not have a space in
it (e.g. "C:\Temp\show params.exe")?

Ludovic Brenta.

           What    |Removed                     |Added
                 CC|                            |ludovic dot brenta at
                   |                            |insalien dot org


More information about the Gcc-bugs mailing list