# HG changeset patch # User Gerd Moellmann # Date 952346513 0 # Node ID 9c8bcd7e4a4fc28f2f8436578ae74c44c52b9575 # Parent 8232258537cce00206f1f72f30475deb74f08808 (send_process): Remove local variable `procname' that might become invalid when a GC happens. Instead, access the process name slot directly. diff -r 8232258537cc -r 9c8bcd7e4a4f src/process.c --- 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 }