This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


------- Additional Comments From sbellon at sbellon dot de  2005-02-20 18:33 -------
Subject: Re:  Bug in GNAT.Expect.Non_Blocking_Spawn

On 20 Feb, you wrote:

> 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.

Yes, I completely agree.

[snip]

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

I already tried that last week (and you are right), but decided to go
for the easy solution as the main inconsistency is indeed in
GNAT.Expect.Non_Blocking_Spawn. Fixing it there brings it in line with
the other Spawn functions in GNAT.OS_Lib and fixes the most frequent
case of spaces in pathnames ("C:\Program Files\"). It's in any case not
wrong to apply my suggested patch there.

If in addition, Ada.Command_Line was changed that even spaces in the
basename are taken care of, even better. But changing Ada.Command_Line
isn't an alternative but an addition to the suggested patch.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20075


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]