all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Richard <youngfrog@members.fsf.org>
To: 21831@debbugs.gnu.org
Cc: cornelius.mika@gmail.com
Subject: bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument
Date: Thu, 05 Nov 2015 09:42:54 +0100	[thread overview]
Message-ID: <874mh03khd.fsf@members.fsf.org> (raw)
In-Reply-To: <838u6dtr5v.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 04 Nov 2015 23:01:48 +0200")

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	other threads:[~2015-11-05  8:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 20:31 bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument Cornelius Mika
2015-11-04 21:01 ` Eli Zaretskii
2015-11-05  8:42   ` Nicolas Richard [this message]
2015-11-05 18:14     ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=874mh03khd.fsf@members.fsf.org \
    --to=youngfrog@members.fsf.org \
    --cc=21831@debbugs.gnu.org \
    --cc=cornelius.mika@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.