~ubuntu-branches/ubuntu/oneiric/socat/oneiric

« back to all changes in this revision

Viewing changes to xioread.c

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Seyrat
  • Date: 2005-04-04 17:32:49 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050404173249-gie1wgg3k8ac89lh
Tags: 1.4.2.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: xioread.c,v 1.21 2004/06/20 21:19:02 gerhard Exp $ */
2
 
/* Copyright Gerhard Rieger 2001-2004 */
 
1
/* $Id: xioread.c,v 1.22 2005/03/15 07:34:24 gerhard Exp $ */
 
2
/* Copyright Gerhard Rieger 2001-2005 */
3
3
/* Published under the GNU General Public License V.2, see file COPYING */
4
4
 
5
5
/* this is the source of the extended read function */
43
43
         bytes = Read(pipe->fd, buff, bufsiz);
44
44
      } while (bytes < 0 && errno == EINTR);
45
45
      if (bytes < 0) {
46
 
         Error4("read(%d, %p, "F_Zu"): %s",
47
 
                pipe->fd, buff, bufsiz, strerror(errno));
 
46
         switch (errno) {
 
47
#if 1
 
48
         case EPIPE: case ECONNRESET:
 
49
            Warn4("read(%d, %p, "F_Zu"): %s",
 
50
                  pipe->fd, buff, bufsiz, strerror(errno));
 
51
            break;
 
52
#endif
 
53
         default:
 
54
            Error4("read(%d, %p, "F_Zu"): %s",
 
55
                   pipe->fd, buff, bufsiz, strerror(errno));
 
56
         }
48
57
         return -1;
49
58
      }
50
59
   } else if (pipe->dtype == DATA_PTY) {