aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-28 04:35:39 +0000
committerRichard M. Stallman1994-04-28 04:35:39 +0000
commit6311cf580d679fc27246dc30b9609827a92f2584 (patch)
tree30948cf9f3350f97a96c61b50328c91ee296519b /src/process.c
parentf46efdf9e276f5b438a6d96aee6403395dcdad01 (diff)
downloademacs-6311cf580d679fc27246dc30b9609827a92f2584.tar.gz
emacs-6311cf580d679fc27246dc30b9609827a92f2584.zip
(create_process): If vfork fails, close forkin and forkout.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index 8cb89b94d48..8b7b0dd46d0 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1396,7 +1396,13 @@ create_process (process, new_argv, current_dir)
1396 } 1396 }
1397 1397
1398 if (pid < 0) 1398 if (pid < 0)
1399 report_file_error ("Doing vfork", Qnil); 1399 {
1400 if (forkin >= 0)
1401 close (forkin);
1402 if (forkin != forkout && forkout >= 0)
1403 close (forkout);
1404 report_file_error ("Doing vfork", Qnil);
1405 }
1400 1406
1401 XFASTINT (XPROCESS (process)->pid) = pid; 1407 XFASTINT (XPROCESS (process)->pid) = pid;
1402 1408