diff options
author | Kenichi Handa <handa@m17n.org> | 2007-03-01 10:17:41 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2007-03-01 10:17:41 +0000 |
commit | 6c9722eb3f8c74131b62ddc95df98d0c7dbe59a9 (patch) | |
tree | 8958b41b9ccb2dd120b5d51b1b72b3a330ad8619 | |
parent | cffd6f8431fe9bad44fdb0a8019ee2fa07dc6786 (diff) | |
download | emacs-6c9722eb3f8c74131b62ddc95df98d0c7dbe59a9.tar.gz |
(send_process_object): Check the process status and
signal an error if something is wrong.
-rw-r--r-- | src/process.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c index 7f651e36700..78fc400e5a2 100644 --- a/src/process.c +++ b/src/process.c @@ -5694,8 +5694,16 @@ send_process_object (proc, start, end) : ! NILP (XBUFFER (object)->enable_multibyte_characters)) { struct Lisp_Process *p = XPROCESS (proc); - struct coding_system *coding = proc_encode_coding_system[XINT (p->outfd)]; + struct coding_system *coding; + if (p->raw_status_new) + update_status (p); + if (! EQ (p->status, Qrun)) + error ("Process %s not running", SDATA (p->name)); + if (XINT (p->outfd) < 0) + error ("Output file descriptor of %s is closed", SDATA (p->name)); + + coding = proc_encode_coding_system[XINT (p->outfd)]; if (! EQ (coding->symbol, p->encode_coding_system)) /* The coding system for encoding was changed to raw-text because we sent a unibyte text previously. Now we are |