Minor error handling improvements and minor code polish

darcs-hash:20070801173801-ac50b-11a281d9f622e935c1f138355babd20269068f35.gz
This commit is contained in:
axel
2007-08-02 03:38:01 +10:00
parent df55e89bbb
commit 58fd6b895a
7 changed files with 10 additions and 19 deletions

View File

@@ -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 );