aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman2002-08-24 03:16:03 +0000
committerRichard M. Stallman2002-08-24 03:16:03 +0000
commited30cf85d76ca9ea9ac03ed903a4e4b3994a1d81 (patch)
tree37b0e1890baedca08292006358ff94ba08cc0eae /src/process.c
parentca3df2d557f9498f0755abecb5a7b9393bb4338f (diff)
downloademacs-ed30cf85d76ca9ea9ac03ed903a4e4b3994a1d81.tar.gz
emacs-ed30cf85d76ca9ea9ac03ed903a4e4b3994a1d81.zip
(Fstart_process): Remove /: from program name.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c
index c4d95c6074f..0a1265f4709 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1421,7 +1421,8 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */)
1421#else /* not VMS */ 1421#else /* not VMS */
1422 new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); 1422 new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *));
1423 1423
1424 /* If program file name is not absolute, search our path for it */ 1424 /* If program file name is not absolute, search our path for it.
1425 Put the name we will really use in TEM. */
1425 if (!IS_DIRECTORY_SEP (SREF (program, 0)) 1426 if (!IS_DIRECTORY_SEP (SREF (program, 0))
1426 && !(SCHARS (program) > 1 1427 && !(SCHARS (program) > 1
1427 && IS_DEVICE_SEP (SREF (program, 1)))) 1428 && IS_DEVICE_SEP (SREF (program, 1))))
@@ -1435,18 +1436,25 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */)
1435 if (NILP (tem)) 1436 if (NILP (tem))
1436 report_file_error ("Searching for program", Fcons (program, Qnil)); 1437 report_file_error ("Searching for program", Fcons (program, Qnil));
1437 tem = Fexpand_file_name (tem, Qnil); 1438 tem = Fexpand_file_name (tem, Qnil);
1438 tem = ENCODE_FILE (tem);
1439 new_argv[0] = SDATA (tem);
1440 } 1439 }
1441 else 1440 else
1442 { 1441 {
1443 if (!NILP (Ffile_directory_p (program))) 1442 if (!NILP (Ffile_directory_p (program)))
1444 error ("Specified program for new process is a directory"); 1443 error ("Specified program for new process is a directory");
1445 1444 tem = program;
1446 tem = ENCODE_FILE (program);
1447 new_argv[0] = SDATA (tem);
1448 } 1445 }
1449 1446
1447 /* If program file name starts with /: for quoting a magic name,
1448 discard that. */
1449 if (SBYTES (tem) > 2 && SREF (tem, 0) == '/'
1450 && SREF (tem, 1) == ':')
1451 tem = Fsubstring (tem, make_number (2), Qnil);
1452
1453 /* Encode the file name and put it in NEW_ARGV.
1454 That's where the child will use it to execute the program. */
1455 tem = ENCODE_FILE (tem);
1456 new_argv[0] = SDATA (tem);
1457
1450 /* Here we encode arguments by the coding system used for sending 1458 /* Here we encode arguments by the coding system used for sending
1451 data to the process. We don't support using different coding 1459 data to the process. We don't support using different coding
1452 systems for encoding arguments and for encoding data sent to the 1460 systems for encoding arguments and for encoding data sent to the