diff options
| author | Richard M. Stallman | 1993-11-11 04:36:02 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-11 04:36:02 +0000 |
| commit | 5c03767e4f546bd426d24e616016b346fe0b015b (patch) | |
| tree | 88f410d84d72226ffb138f83223120d3632d4d72 /src | |
| parent | 4fd99ee43a45916ff071c7e7a7d84a28193ffd5b (diff) | |
| download | emacs-5c03767e4f546bd426d24e616016b346fe0b015b.tar.gz emacs-5c03767e4f546bd426d24e616016b346fe0b015b.zip | |
(Fcall_process): Clear synch_process_death and
synch_process_retcode before the vfork.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/callproc.c b/src/callproc.c index 4f65ea573cd..197f9c833ef 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.") | |||
| 249 | /* Record that we're about to create a synchronous process. */ | 249 | /* Record that we're about to create a synchronous process. */ |
| 250 | synch_process_alive = 1; | 250 | synch_process_alive = 1; |
| 251 | 251 | ||
| 252 | /* These vars record information from process termination. | ||
| 253 | Clear them now before process can possibly terminate, | ||
| 254 | to avoid timing error if process terminates soon. */ | ||
| 255 | synch_process_death = 0; | ||
| 256 | synch_process_retcode = 0; | ||
| 257 | |||
| 252 | pid = vfork (); | 258 | pid = vfork (); |
| 253 | 259 | ||
| 254 | if (pid == 0) | 260 | if (pid == 0) |
| @@ -293,9 +299,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 293 | return Qnil; | 299 | return Qnil; |
| 294 | } | 300 | } |
| 295 | 301 | ||
| 296 | synch_process_death = 0; | ||
| 297 | synch_process_retcode = 0; | ||
| 298 | |||
| 299 | record_unwind_protect (call_process_cleanup, | 302 | record_unwind_protect (call_process_cleanup, |
| 300 | Fcons (make_number (fd[0]), make_number (pid))); | 303 | Fcons (make_number (fd[0]), make_number (pid))); |
| 301 | 304 | ||