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

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

bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument


From: Nicolas Richard
Subject: bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument
Date: Thu, 05 Nov 2015 09:42:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Cornelius Mika <cornelius.mika@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.





reply via email to

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