rcinput: open input device with apropriate flags

Origin commit data
------------------
Branch: ni/coolstream
Commit: d1cdbd34c8
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-05-04 (Sat, 04 May 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-05-04 13:13:35 +02:00
parent 096d10fccc
commit 8eb55bcea1

View File

@@ -165,12 +165,8 @@ void CRCInput::open(int dev)
if (i != dev || fd_rc[i] != -1)
continue;
}
if ((fd_rc[i] = ::open(RC_EVENT_DEVICE[i], O_RDWR)) == -1)
if ((fd_rc[i] = ::open(RC_EVENT_DEVICE[i], O_RDWR|O_NONBLOCK|O_CLOEXEC)) == -1)
perror(RC_EVENT_DEVICE[i]);
else
{
fcntl(fd_rc[i], F_SETFL, O_NONBLOCK);
}
printf("CRCInput::open: %s fd %d\n", RC_EVENT_DEVICE[i], fd_rc[i]);
}