|
From: SVN U. <dde...@li...> - 2008-03-27 21:35:29
|
Author: ddennedy
Date: 2008-03-27 13:25:26 -0700 (Thu, 27 Mar 2008)
New Revision: 178
Modified:
trunk/src/eventloop.c
Log:
eventloop.c: apply patch from Jonas Bonn to retrty read when failed with EINTR.
This can occur when libraw1394 callera receives a signal while in the read and
the caller is not using a signal handler set with signal().
Modified: trunk/src/eventloop.c
===================================================================
--- trunk/src/eventloop.c 2008-03-27 20:25:23 UTC (rev 177)
+++ trunk/src/eventloop.c 2008-03-27 20:25:26 UTC (rev 178)
@@ -21,7 +21,6 @@
#include <config.h>
#include <unistd.h>
#include <byteswap.h>
-#include <errno.h>
#include "raw1394.h"
#include "kernel-raw1394.h"
@@ -33,8 +32,8 @@
struct raw1394_request req;
int retval = 0, channel;
- while (read(handle->fd, &req, sizeof(req)) < 0) {
- if (errno != EINTR) return -1;
+ if (read(handle->fd, &req, sizeof(req)) < 0) {
+ return -1;
}
switch (req.type) {
|