diff options
| author | Richard M. Stallman | 1992-09-19 20:41:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-09-19 20:41:32 +0000 |
| commit | 88191e3635211f85ecb9bfa97b1f202348e7109e (patch) | |
| tree | a405bdff4439a0f2a14887657d1db8abe95c18c4 /src | |
| parent | 7b2469aed79314f4a73dae64fbf1049c9133c4c7 (diff) | |
| download | emacs-88191e3635211f85ecb9bfa97b1f202348e7109e.tar.gz emacs-88191e3635211f85ecb9bfa97b1f202348e7109e.zip | |
(sys_suspend): Read EMACS_PARENT_PID envvar for parent.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sysdep.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 74b895288e9..b8f819ddbaa 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -500,9 +500,26 @@ struct save_signal | |||
| 500 | sys_suspend () | 500 | sys_suspend () |
| 501 | { | 501 | { |
| 502 | #ifdef VMS | 502 | #ifdef VMS |
| 503 | unsigned long parent_id; | 503 | /* "Foster" parentage allows emacs to return to a subprocess that attached |
| 504 | to the current emacs as a cheaper than starting a whole new process. This | ||
| 505 | is set up by KEPTEDITOR.COM. */ | ||
| 506 | unsigned long parent_id, foster_parent_id; | ||
| 507 | char *fpid_string; | ||
| 508 | |||
| 509 | fpid_string = getenv ("EMACS_PARENT_PID"); | ||
| 510 | if (fpid_string != NULL) | ||
| 511 | { | ||
| 512 | sscanf (fpid_string, "%x", &foster_parent_id); | ||
| 513 | if (foster_parent_id != 0) | ||
| 514 | parent_id = foster_parent_id; | ||
| 515 | else | ||
| 516 | parent_id = getppid (); | ||
| 517 | } | ||
| 518 | else | ||
| 519 | parent_id = getppid (); | ||
| 520 | |||
| 521 | free (fpid_string); /* On VMS, this was malloc'd */ | ||
| 504 | 522 | ||
| 505 | parent_id = getppid (); | ||
| 506 | if (parent_id && parent_id != 0xffffffff) | 523 | if (parent_id && parent_id != 0xffffffff) |
| 507 | { | 524 | { |
| 508 | SIGTYPE (*oldsig)() = (int) signal (SIGINT, SIG_IGN); | 525 | SIGTYPE (*oldsig)() = (int) signal (SIGINT, SIG_IGN); |