Use qt_safe_read to read from low-level file descriptor
Change-Id: I7c7bc379a423be4de471c5972cb98101c90bab8c Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
parent
7c89d44d95
commit
5368ad604c
@ -50,6 +50,7 @@
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QSocketNotifier>
|
||||
#include <QtCore/private/qcore_unix_p.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -257,7 +258,7 @@ void QBBNavigatorThread::readData()
|
||||
|
||||
// attempt to read pps data
|
||||
errno = 0;
|
||||
int bytes = read(m_fd, buffer, ppsBufferSize - 1);
|
||||
int bytes = qt_safe_read(m_fd, buffer, ppsBufferSize - 1);
|
||||
if (bytes == -1) {
|
||||
qFatal("QBB: failed to read navigator pps, errno=%d", errno);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user