changeset 28012:9c8bcd7e4a4f

(send_process): Remove local variable `procname' that might become invalid when a GC happens. Instead, access the process name slot directly.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 06 Mar 2000 12:41:53 +0000
parents 8232258537cc
children b8291d86b5fd
files src/process.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Mon Mar 06 12:11:01 2000 +0000
+++ b/src/process.c	Mon Mar 06 12:41:53 2000 +0000
@@ -3260,7 +3260,6 @@
 {
   /* Use volatile to protect variables from being clobbered by longjmp.  */
   int rv;
-  volatile unsigned char *procname = XSTRING (XPROCESS (proc)->name)->data;
   struct coding_system *coding;
   struct gcpro gcpro1;
   int carryover = XINT (XPROCESS (proc)->encoding_carryover);
@@ -3275,9 +3274,11 @@
   if (! NILP (XPROCESS (proc)->raw_status_low))
     update_status (XPROCESS (proc));
   if (! EQ (XPROCESS (proc)->status, Qrun))
-    error ("Process %s not running", procname);
+    error ("Process %s not running",
+	   XSTRING (XPROCESS (proc)->name)->data);
   if (XINT (XPROCESS (proc)->outfd) < 0)
-    error ("Output file descriptor of %s is closed", procname);
+    error ("Output file descriptor of %s is closed",
+	   XSTRING (XPROCESS (proc)->name)->data);
 
   coding = proc_encode_coding_system[XINT (XPROCESS (proc)->outfd)];
   Vlast_coding_system_used = coding->symbol;
@@ -3490,9 +3491,11 @@
       XSETINT (XPROCESS (proc)->tick, ++process_tick);
       deactivate_process (proc);
 #ifdef VMS
-      error ("Error writing to process %s; closed it", procname);
+      error ("Error writing to process %s; closed it", 
+	     XSTRING (XPROCESS (proc)->name)->data);
 #else
-      error ("SIGPIPE raised on process %s; closed it", procname);
+      error ("SIGPIPE raised on process %s; closed it",
+	     XSTRING (XPROCESS (proc)->name)->data);
 #endif
     }