diff options
| author | Karl Heuer | 1994-03-18 00:12:41 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-03-18 00:12:41 +0000 |
| commit | 3b639868cedb7e5af9440c6b85dc73bd56187e10 (patch) | |
| tree | a0f452ea42c6f107d93a55d91624337726155433 /src | |
| parent | 5458f7f15818ccc49685ec9ac4e0195d77bb3fcf (diff) | |
| download | emacs-3b639868cedb7e5af9440c6b85dc73bd56187e10.tar.gz emacs-3b639868cedb7e5af9440c6b85dc73bd56187e10.zip | |
(Fstart_process): GCPRO some things.
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c index 1c1ac73e9f9..6e9da96bf07 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1024,24 +1024,29 @@ Remaining arguments are strings to give program as arguments.") | |||
| 1024 | #else /* not VMS */ | 1024 | #else /* not VMS */ |
| 1025 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); | 1025 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); |
| 1026 | 1026 | ||
| 1027 | for (i = 3; i < nargs; i++) | ||
| 1028 | { | ||
| 1029 | tem = args[i]; | ||
| 1030 | CHECK_STRING (tem, i); | ||
| 1031 | new_argv[i - 2] = XSTRING (tem)->data; | ||
| 1032 | } | ||
| 1033 | new_argv[i - 2] = 0; | ||
| 1034 | new_argv[0] = XSTRING (program)->data; | ||
| 1035 | |||
| 1036 | /* If program file name is not absolute, search our path for it */ | 1027 | /* If program file name is not absolute, search our path for it */ |
| 1037 | if (new_argv[0][0] != '/') | 1028 | if (XSTRING (program)->data[0] != '/') |
| 1038 | { | 1029 | { |
| 1030 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | ||
| 1031 | |||
| 1039 | tem = Qnil; | 1032 | tem = Qnil; |
| 1033 | GCPRO4 (name, program, buffer, current_dir); | ||
| 1040 | openp (Vexec_path, program, EXEC_SUFFIXES, &tem, 1); | 1034 | openp (Vexec_path, program, EXEC_SUFFIXES, &tem, 1); |
| 1035 | UNGCPRO; | ||
| 1041 | if (NILP (tem)) | 1036 | if (NILP (tem)) |
| 1042 | report_file_error ("Searching for program", Fcons (program, Qnil)); | 1037 | report_file_error ("Searching for program", Fcons (program, Qnil)); |
| 1043 | new_argv[0] = XSTRING (tem)->data; | 1038 | new_argv[0] = XSTRING (tem)->data; |
| 1044 | } | 1039 | } |
| 1040 | else | ||
| 1041 | new_argv[0] = XSTRING (program)->data; | ||
| 1042 | |||
| 1043 | for (i = 3; i < nargs; i++) | ||
| 1044 | { | ||
| 1045 | tem = args[i]; | ||
| 1046 | CHECK_STRING (tem, i); | ||
| 1047 | new_argv[i - 2] = XSTRING (tem)->data; | ||
| 1048 | } | ||
| 1049 | new_argv[i - 2] = 0; | ||
| 1045 | #endif /* not VMS */ | 1050 | #endif /* not VMS */ |
| 1046 | 1051 | ||
| 1047 | proc = make_process (name); | 1052 | proc = make_process (name); |