This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/20075] Bug in GNAT.Expect.Non_Blocking_Spawn
- From: "ludovic dot brenta at insalien dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2005 17:14:47 -0000
- Subject: [Bug ada/20075] Bug in GNAT.Expect.Non_Blocking_Spawn
- References: <20050219113933.20075.sbellon@sbellon.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20075