unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Eli Zaretskii" <eliz@elta.co.il>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: possible bug in process.c?
Date: Thu, 15 Jan 2004 10:30:39 +0200	[thread overview]
Message-ID: <5567-Thu15Jan2004103039+0200-eliz@elta.co.il> (raw)
In-Reply-To: <20040114185244.GA17851@mlvezie.org> (message from Michael Vezie on Wed, 14 Jan 2004 13:52:44 -0500)

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

      reply	other threads:[~2004-01-15  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-14 18:52 possible bug in process.c? Michael Vezie
2004-01-15  8:30 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5567-Thu15Jan2004103039+0200-eliz@elta.co.il \
    --to=eliz@elta.co.il \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).