changeset 53712:659b9b404c02

Define synch_process_termsig. (Fcall_process): Initiate synch_process_termsig to zero and check if non-zero and get signal name after subprocess has ended.
author Jan Djärv <jan.h.d@swipnet.se>
date Mon, 26 Jan 2004 23:39:08 +0000
parents 46adc18f9815
children e069e543fd28
files src/callproc.c
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Mon Jan 26 23:06:20 2004 +0000
+++ b/src/callproc.c	Mon Jan 26 23:39:08 2004 +0000
@@ -123,6 +123,9 @@
 /* Nonzero => this is a string explaining death of synchronous subprocess.  */
 char *synch_process_death;
 
+/* Nonzero => this is the signal number that terminated the subprocess.  */
+int synch_process_termsig;
+
 /* If synch_process_death is zero,
    this is exit code of synchronous subprocess.  */
 int synch_process_retcode;
@@ -506,6 +509,7 @@
        to avoid timing error if process terminates soon.  */
     synch_process_death = 0;
     synch_process_retcode = 0;
+    synch_process_termsig = 0;
 
     if (NILP (error_file))
       fd_error = emacs_open (NULL_DEVICE, O_WRONLY, 0);
@@ -977,6 +981,19 @@
 
   unbind_to (count, Qnil);
 
+  if (synch_process_termsig)
+    {
+      char *signame;
+
+      synchronize_system_messages_locale ();
+      signame = strsignal (synch_process_termsig);
+
+      if (signame == 0)
+        signame = "unknown";
+
+      synch_process_death = signame;
+    }
+
   if (synch_process_death)
     return code_convert_string_norecord (build_string (synch_process_death),
 					 Vlocale_coding_system, 0);