EINTR is not an error
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@289 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
576c4f55c2
commit
13bd9989b2
@ -290,8 +290,13 @@ static void cmd_cat(int argc, char **argv)
|
|||||||
|
|
||||||
if (nbytesread < 0)
|
if (nbytesread < 0)
|
||||||
{
|
{
|
||||||
printf(g_fmtcmdfailed, argv[0], "read", strerror(errno));
|
/* EINTR is not an error */
|
||||||
break;
|
|
||||||
|
if (errno != EINTR)
|
||||||
|
{
|
||||||
|
printf(g_fmtcmdfailed, argv[0], "read", strerror(errno));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for data successfully read */
|
/* Check for data successfully read */
|
||||||
@ -306,10 +311,18 @@ static void cmd_cat(int argc, char **argv)
|
|||||||
int n = write(1, buffer, nbytesread);
|
int n = write(1, buffer, nbytesread);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
{
|
{
|
||||||
printf(g_fmtcmdfailed, argv[0], "write", strerror(errno));
|
/* EINTR is not an error */
|
||||||
break;
|
|
||||||
|
if (errno != EINTR)
|
||||||
|
{
|
||||||
|
printf(g_fmtcmdfailed, argv[0], "write", strerror(errno));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nbyteswritten += n;
|
||||||
}
|
}
|
||||||
nbyteswritten += n;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user