[tracker/error-handling: 4/10] libtracker-data: Handle EINTR instead of EAGAIN when writing journal
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/error-handling: 4/10] libtracker-data: Handle EINTR instead of EAGAIN when writing journal
- Date: Tue, 17 May 2011 15:14:59 +0000 (UTC)
commit 52c86c2eb23482d626672a0a7f2ce9a3b8fd1ea0
Author: Jürg Billeter <j bitron ch>
Date: Tue May 17 15:12:33 2011 +0200
libtracker-data: Handle EINTR instead of EAGAIN when writing journal
Writing to a regular file will never set EAGAIN.
src/libtracker-data/tracker-db-journal.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-journal.c b/src/libtracker-data/tracker-db-journal.c
index bd4fbeb..486baa2 100644
--- a/src/libtracker-data/tracker-db-journal.c
+++ b/src/libtracker-data/tracker-db-journal.c
@@ -406,7 +406,8 @@ write_all_data (int fd,
written = write (fd, data, len);
if (written < 0) {
- if (errno == EAGAIN) {
+ if (errno == EINTR) {
+ /* interrupted by signal, try again */
continue;
}
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]