[tracker/tracker-0.10] libtracker-data: Handle EINTR instead of EAGAIN when writing journal



commit 6a4f7b6157bf0dbd96a7e5d5e2ca5d01b02d761c
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]