summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-03-18 00:13:22 +0000
committerKarl Heuer <kwzh@gnu.org>1994-03-18 00:13:22 +0000
commitc52b0b3467ce9a1c4dc02ce133a09d536d23524f (patch)
tree2d4758a223d1f9029516f5dae9b07a97b4edd4fb /src/callproc.c
parent3b639868cedb7e5af9440c6b85dc73bd56187e10 (diff)
downloademacs-c52b0b3467ce9a1c4dc02ce133a09d536d23524f.tar.gz
(Fcall_process): GCPRO some things.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 04c2bdc7579..21d0f444a77 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -228,9 +228,9 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
GCPRO3 (infile, buffer, current_dir);
- current_dir =
- expand_and_dir_to_file
- (Funhandled_file_name_directory (current_dir), Qnil);
+ current_dir
+ = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir),
+ Qnil);
if (NILP (Ffile_accessible_directory_p (current_dir)))
report_file_error ("Setting current directory",
Fcons (current_buffer->directory, Qnil));
@@ -240,31 +240,34 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
display = nargs >= 4 ? args[3] : Qnil;
- {
- register int i;
- for (i = 4; i < nargs; i++)
- {
- CHECK_STRING (args[i], i);
- new_argv[i - 3] = XSTRING (args[i])->data;
- }
- /* Program name is first command arg */
- new_argv[0] = XSTRING (args[0])->data;
- new_argv[i - 3] = 0;
- }
-
filefd = open (XSTRING (infile)->data, O_RDONLY, 0);
if (filefd < 0)
{
report_file_error ("Opening process input file", Fcons (infile, Qnil));
}
/* Search for program; barf if not found. */
- openp (Vexec_path, args[0], EXEC_SUFFIXES, &path, 1);
+ {
+ struct gcpro gcpro1;
+
+ GCPRO1 (current_dir);
+ openp (Vexec_path, args[0], EXEC_SUFFIXES, &path, 1);
+ UNGCPRO;
+ }
if (NILP (path))
{
close (filefd);
report_file_error ("Searching for program", Fcons (args[0], Qnil));
}
new_argv[0] = XSTRING (path)->data;
+ {
+ register int i;
+ for (i = 4; i < nargs; i++)
+ {
+ CHECK_STRING (args[i], i);
+ new_argv[i - 3] = XSTRING (args[i])->data;
+ }
+ new_argv[i - 3] = 0;
+ }
#ifdef MSDOS /* MW, July 1993 */
/* These vars record information from process termination.