changeset 84:1b61fd7c6fde

should just shutdown when write() fails.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 13 Jan 2010 17:14:43 +0900
parents b8032e8099de
children 28ba9315a30c
files recpt1/recpt1.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/recpt1/recpt1.c	Sat Jan 09 12:50:24 2010 +0900
+++ b/recpt1/recpt1.c	Wed Jan 13 17:14:43 2010 +0900
@@ -365,7 +365,7 @@
         free(qbuf);
 
         /* normal exit */
-        if(f_exit && !p_queue->num_used && !file_err) {
+        if((f_exit && !p_queue->num_used) || file_err) {
 
             buf = sbuf; /* default */
 
@@ -377,7 +377,7 @@
                     buf = dbuf;
             }
 
-            if(!fileless) {
+            if(!fileless && !file_err) {
                 wc = write(wfd, buf.data, buf.size);
                 if(wc < 0) {
                     perror("write");