emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117998: Don't modify the process's command name pas


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r117998: Don't modify the process's command name passed to start-process on MS-Windows.
Date: Wed, 01 Oct 2014 15:19:25 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117998
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Wed 2014-10-01 18:18:16 +0300
message:
  Don't modify the process's command name passed to start-process on MS-Windows.
  
   src/w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
   argument passed by the caller, when we mirror all slashes into
   backslashes.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/w32proc.c                  w32proc.c-20091113204419-o5vbwnq5f7feedwu-814
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-10-01 14:58:54 +0000
+++ b/src/ChangeLog     2014-10-01 15:18:16 +0000
@@ -1,3 +1,9 @@
+2014-10-01  Eli Zaretskii  <address@hidden>
+
+       * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
+       argument passed by the caller, when we mirror all slashes into
+       backslashes.
+
 2014-10-01  Dmitry Antipov  <address@hidden>
 
        * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):

=== modified file 'src/w32proc.c'
--- a/src/w32proc.c     2014-09-25 09:34:53 +0000
+++ b/src/w32proc.c     2014-10-01 15:18:16 +0000
@@ -1605,6 +1605,15 @@
       program = ENCODE_FILE (full);
       cmdname = SDATA (program);
     }
+  else
+    {
+      char *p = alloca (strlen (cmdname) + 1);
+
+      /* Don't change the command name we were passed by our caller
+        (unixtodos_filename below will destructively mirror forward
+        slashes).  */
+      cmdname = strcpy (p, cmdname);
+    }
 
   /* make sure argv[0] and cmdname are both in DOS format */
   unixtodos_filename (cmdname);


reply via email to

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