# HG changeset patch # User Richard M. Stallman # Date 752992562 0 # Node ID 81c44a01ddda2403e015d2582a39486766e15039 # Parent a81642d50a8e9c998c1ddadf97949b71f66de633 (Fcall_process): Clear synch_process_death and synch_process_retcode before the vfork. diff -r a81642d50a8e -r 81c44a01ddda src/callproc.c --- a/src/callproc.c Thu Nov 11 03:02:18 1993 +0000 +++ b/src/callproc.c Thu Nov 11 04:36:02 1993 +0000 @@ -249,6 +249,12 @@ /* 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 @@ return Qnil; } - synch_process_death = 0; - synch_process_retcode = 0; - record_unwind_protect (call_process_cleanup, Fcons (make_number (fd[0]), make_number (pid)));