nuttx/pty: pass read nonblock flag to pipe

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
This commit is contained in:
fangzhenwei 2021-11-09 15:24:41 +08:00 committed by Xiang Xiao
parent 1afdb06981
commit c7c91488d1

View File

@ -876,7 +876,11 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
case FIONBIO:
{
ret = file_ioctl(&dev->pd_sink, cmd, arg);
ret = file_ioctl(&dev->pd_src, cmd, arg);
if (ret >= 0 || ret == -ENOTTY)
{
ret = file_ioctl(&dev->pd_sink, cmd, arg);
}
}
break;