diff options
author | axel <axel@liljencrantz.se> | 2007-08-02 03:38:01 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2007-08-02 03:38:01 +1000 |
commit | 58fd6b895a7313d466f1afc996cd7cb2c0e7d169 (patch) | |
tree | b66738a73fcc3753441fdacaa380102fd6d3c0a1 /reader.c | |
parent | df55e89bbb5bb382bd13ab8f1a503636e52e3568 (diff) |
Minor error handling improvements and minor code polish
darcs-hash:20070801173801-ac50b-11a281d9f622e935c1f138355babd20269068f35.gz
Diffstat (limited to 'reader.c')
-rw-r--r-- | reader.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2962,16 +2962,18 @@ static int read_ni( int fd, io_data_t *io ) int c; c = fread(buff, 1, 4096, in_stream); - if( ferror( in_stream ) ) + + if( ferror( in_stream ) && ( errno != EINTR ) ) { debug( 1, - _( L"Error while reading commands" ) ); - + _( L"Error while reading from file descriptor" ) ); + /* Reset buffer on error. We won't evaluate incomplete files. */ acc.used=0; break; + } b_append( &acc, buff, c ); |