[systemd-commits] 3 commits - TODO man/sd_journal_seek_head.xml src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Tue Feb 12 19:57:43 PST 2013


 TODO                         |    5 +++++
 man/sd_journal_seek_head.xml |    2 +-
 src/shared/util.c            |   27 +++++++++++++++++----------
 3 files changed, 23 insertions(+), 11 deletions(-)

New commits:
commit 3ef51b2ce8e9ba09d1872544d11a6b7861cc2fb7
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 13 04:57:36 2013 +0100

    man: typo fix

diff --git a/man/sd_journal_seek_head.xml b/man/sd_journal_seek_head.xml
index 3716c5d..d24b2f3 100644
--- a/man/sd_journal_seek_head.xml
+++ b/man/sd_journal_seek_head.xml
@@ -101,7 +101,7 @@
 
                 <para><function>sd_journal_seek_monotonic_usec()</function>
                 seeks to the entry with the specified monotonic
-                timestamp, i.e. CLOCK_MONOOTONIC. Since monotonic time
+                timestamp, i.e. CLOCK_MONOTONIC. Since monotonic time
                 restarts on every reboot a boot ID needs to be
                 specified as well.</para>
 

commit dd359de89b1fbabf6f4eb5003d2b5a806b6185c1
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 13 04:57:30 2013 +0100

    update TODO

diff --git a/TODO b/TODO
index f97663f..7f77605 100644
--- a/TODO
+++ b/TODO
@@ -51,8 +51,13 @@ Fedora 19:
 
 * logind: Class property should probably know "background" or so as value for cron jobs, and the inhibition checks should filter those out too.
 
+* timer logic is confused by units which are skipped due to failing condition
+  http://lists.freedesktop.org/archives/systemd-devel/2013-February/008816.html
+
 Features:
 
+* ensure sd_journal_seek_monotonic actually works properly.
+
 * timedate: have global on/off switches for auto-time (NTP), and auto-timezone that connman can subscribe to.
 
 * support --root= in msgcatalog compiler

commit b0ee8068da5bc9ed949656700274bb6ff60d2073
Author: Colin Walters <walters at verbum.org>
Date:   Fri Jan 25 11:21:20 2013 -0500

    util: *DO NOT* loop for EINTR handling with close_nointr()
    
    See the linked references for why we should not do this.

diff --git a/src/shared/util.c b/src/shared/util.c
index aa0532a..d754c83 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -183,18 +183,25 @@ bool first_word(const char *s, const char *word) {
 }
 
 int close_nointr(int fd) {
-        assert(fd >= 0);
-
-        for (;;) {
-                int r;
+        int r;
 
-                r = close(fd);
-                if (r >= 0)
-                        return r;
+        assert(fd >= 0);
+        r = close(fd);
 
-                if (errno != EINTR)
-                        return -errno;
-        }
+        /* Just ignore EINTR; a retry loop is the wrong
+         * thing to do on Linux.
+         *
+         * http://lkml.indiana.edu/hypermail/linux/kernel/0509.1/0877.html
+         * https://bugzilla.gnome.org/show_bug.cgi?id=682819
+         * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR
+         * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain
+         */
+        if (_unlikely_(r < 0 && errno == EINTR))
+                return 0;
+        else if (r >= 0)
+                return r;
+        else
+                return -errno;
 }
 
 void close_nointr_nofail(int fd) {



More information about the systemd-commits mailing list