diff options
author | ddennedy <ddennedy@53a565d1-3bb7-0310-b661-cf11e63c67ab> | 2008-03-27 20:25:26 +0000 |
---|---|---|
committer | ddennedy <ddennedy@53a565d1-3bb7-0310-b661-cf11e63c67ab> | 2008-03-27 20:25:26 +0000 |
commit | 4ce7f7d8f0e0189eff7f1b585724ef132c36c820 (patch) | |
tree | cf870554be969ba6726385b1b1c5d6c89d971eb3 | |
parent | 8bb915dd16bfc27fa206a850e9f56439e5e424ee (diff) | |
download | libraw1394-4ce7f7d8f0e0189eff7f1b585724ef132c36c820.tar.gz |
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().
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@178 53a565d1-3bb7-0310-b661-cf11e63c67ab
-rw-r--r-- | src/eventloop.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/eventloop.c b/src/eventloop.c index 4a027b2..0ddd455 100644 --- a/src/eventloop.c +++ b/src/eventloop.c @@ -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 @@ int raw1394_loop_iterate(struct raw1394_handle *handle) 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) { |