[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible bug in process.c?
From: |
Eli Zaretskii |
Subject: |
Re: possible bug in process.c? |
Date: |
Thu, 15 Jan 2004 10:30:39 +0200 |
> Date: Wed, 14 Jan 2004 13:52:44 -0500
> From: Michael Vezie <mlv@pobox.com>
>
> /* If program file name is not absolute, search our path for it */
> if (!IS_DIRECTORY_SEP (XSTRING (program)->data[0])
> && !(XSTRING (program)->size > 1
> && IS_DEVICE_SEP (XSTRING (program)->data[1])))
> {
>
> ... at which point it then processes a relative pathname file (looking
> through Vexec_path
> for the executable, etc).
>
> Maybe I'm reading this wrong (help me out if I am), but shouldn't that last
> line there read:
> && !IS_DEVICE_SEP (XSTRING (program)->data[1])))
> note ^
>
> Here's how I read it:
>
> If the first character is not a directory separator ('/' or '\\') and the
> string is longer than
> 1 and the second character is a device separator (':')... you're checking
> here if the string denotes
> a relative path. But if the second character is a ':', then it's something
> like:
>
> c:/fsf/emacs-21.3/bin/cmdproxy.exe
>
> which is an absolute path, and doesn't require looking through Vexec_path.
My reading of that code is:
If the first character is not '/' or '\\' and either the file name
is not longer than 1 character or its second character is not ':',
then it's not an absolute file name.
> In any case, I get an error preceeded by "Searching for program" when I set
> my SHELL environment
> variable to c:/fsf/emacs-21.3/bin/cmdproxy.exe (it should never search for
> the program in the path
> with an absolute path like that), and things work fine when I set my SHELL
> environment variable to
> simply cmdproxy.exe
Could you please see with a debugger whether the code in question is
indeed the one that's misbehaving?