From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24244 invoked by alias); 20 Feb 2005 18:33:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24224 invoked by alias); 20 Feb 2005 18:33:42 -0000 Date: Mon, 21 Feb 2005 02:01:00 -0000 Message-ID: <20050220183342.24223.qmail@sourceware.org> From: "sbellon at sbellon dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050219113933.20075.sbellon@sbellon.de> References: <20050219113933.20075.sbellon@sbellon.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug ada/20075] Bug in GNAT.Expect.Non_Blocking_Spawn X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg02412.txt.bz2 List-Id: ------- 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