aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-11-11 04:36:02 +0000
committerRichard M. Stallman <[email protected]>1993-11-11 04:36:02 +0000
commit5c03767e4f546bd426d24e616016b346fe0b015b (patch)
tree88f410d84d72226ffb138f83223120d3632d4d72 /src
parent4fd99ee43a45916ff071c7e7a7d84a28193ffd5b (diff)
(Fcall_process): Clear synch_process_death and
synch_process_retcode before the vfork.
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 4f65ea573c..197f9c833e 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -249,6 +249,12 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
/* Record that we're about to create a synchronous process. */
synch_process_alive = 1;
+ /* These vars record information from process termination.
+ Clear them now before process can possibly terminate,
+ to avoid timing error if process terminates soon. */
+ synch_process_death = 0;
+ synch_process_retcode = 0;
+
pid = vfork ();
if (pid == 0)
@@ -293,9 +299,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
return Qnil;
}
- synch_process_death = 0;
- synch_process_retcode = 0;
-
record_unwind_protect (call_process_cleanup,
Fcons (make_number (fd[0]), make_number (pid)));