bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6784: 24.0.50; cmdproxy incosistency with command pathnames


From: Eli Zaretskii
Subject: bug#6784: 24.0.50; cmdproxy incosistency with command pathnames
Date: Tue, 03 Aug 2010 22:28:22 +0300

> From: Laimonas Vėbra <laimonas.vebra@gmail.com>
> Cc: 6784@debbugs.gnu.org
> 
> Óscar Fuentes wrote:
> 
> > That's one more incosistency: a long command works fine, then you put
> > that command as part of a pipe chain and it stops working. I guess the
> > current cmdproxy approach is the lesser evil.
> 
> It's a CreateProcess() (in cmdproxy.c) _valid_ path requirement/problem; 
> valid path/directory separator is (should be) '\':

But the name of the shell, which is the only file name CreateProcess
should care about in this case, _is_ converted to use backslashes:

      progname = getenv ("COMSPEC");
      if (!progname)
        fail ("error: COMSPEC is not set\n");

      canon_filename (progname);

And canon_filename is

    char *
    canon_filename (char *fname)
    {
      char *p = fname;

      while (*p)
        {
          if (*p == '/')
            *p = '\\';
          p++;
        }

      return fname;
    }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]