aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1992-09-19 20:41:32 +0000
committerRichard M. Stallman1992-09-19 20:41:32 +0000
commit88191e3635211f85ecb9bfa97b1f202348e7109e (patch)
treea405bdff4439a0f2a14887657d1db8abe95c18c4
parent7b2469aed79314f4a73dae64fbf1049c9133c4c7 (diff)
downloademacs-88191e3635211f85ecb9bfa97b1f202348e7109e.tar.gz
emacs-88191e3635211f85ecb9bfa97b1f202348e7109e.zip
(sys_suspend): Read EMACS_PARENT_PID envvar for parent.
-rw-r--r--src/sysdep.c21
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
500sys_suspend () 500sys_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);