GNU bug report logs - #21831
24.5 on Windows; start-process modifies its PROGRAM argument

Previous Next

Package: emacs;

Reported by: Cornelius Mika <cornelius.mika <at> gmail.com>

Date: Wed, 4 Nov 2015 20:46:02 UTC

Severity: normal

Found in version 24.5

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Richard <youngfrog <at> members.fsf.org>
To: 21831 <at> debbugs.gnu.org
Cc: cornelius.mika <at> gmail.com, eliz <at> gnu.org
Subject: bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument
Date: Thu, 05 Nov 2015 09:42:54 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Cornelius Mika <cornelius.mika <at> gmail.com>
>> Minimal repro:
>> (let ((path "c:/Windows/System32/clip.exe"))
>> (start-process "" nil path)
>> path) ; => "c:\\Windows\\System32\\clip.exe"

> I can reproduce this in Emacs 24.5, but not in the current development
> sources.  So this problem was already fixed as part of the development
> since then, and I see the code which was added to avoid this.

Thanks for checking.
Did you see a test associated to this fix ?

perhaps something like :

(ert-deftest start-process-should-not-modify-arguments ()
  "`start-process' must not modify its arguments in-place."
  ;; See bug#21831.
  (let* ((path (pcase system-type
                 ('windows-nt  "c:/Windows/System32/clip.exe")
                 ('ms-dos "c:/command.com")
                 (_ "/bin//sh")))
         (samepath (copy-sequence path)))
    (start-process "" nil path)
    (should (equal path samepath))))

to be included in test/automated/process-tests.el

I'm not sure what a good value of `path' might be.

-- 
Nico.




This bug report was last modified 9 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.