EINTR is not an error
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@289 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
f328956ced
commit
1cb65a9f8d
|
@ -290,8 +290,13 @@ static void cmd_cat(int argc, char **argv)
|
|||
|
||||
if (nbytesread < 0)
|
||||
{
|
||||
printf(g_fmtcmdfailed, argv[0], "read", strerror(errno));
|
||||
break;
|
||||
/* EINTR is not an error */
|
||||
|
||||
if (errno != EINTR)
|
||||
{
|
||||
printf(g_fmtcmdfailed, argv[0], "read", strerror(errno));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for data successfully read */
|
||||
|
@ -306,10 +311,18 @@ static void cmd_cat(int argc, char **argv)
|
|||
int n = write(1, buffer, nbytesread);
|
||||
if (n < 0)
|
||||
{
|
||||
printf(g_fmtcmdfailed, argv[0], "write", strerror(errno));
|
||||
break;
|
||||
/* EINTR is not an error */
|
||||
|
||||
if (errno != EINTR)
|
||||
{
|
||||
printf(g_fmtcmdfailed, argv[0], "write", strerror(errno));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nbyteswritten += n;
|
||||
}
|
||||
nbyteswritten += n;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue