]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin, hwclock: use xusleep() instead of usleep()
authorSami Kerola <kerolasa@iki.fi>
Sun, 8 Feb 2015 20:44:41 +0000 (20:44 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Feb 2015 12:21:24 +0000 (13:21 +0100)
As said in include/c.h the usleep() is marked as obsolete, so do the same
that most of the other util-linux calls do with this interface.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/sulogin.c
sys-utils/hwclock.c

index f4d68c4888cc0d17e0bd6c8e2d491c8207034f63..51bc58239bec4012218a5fc787767b682c8523cb 100644 (file)
@@ -1066,7 +1066,7 @@ int main(int argc, char **argv)
                        if (*usemask & (1<<con->id))
                                continue;
                        kill(con->pid, SIGHUP);
-                       usleep(50000);
+                       xusleep(50000);
                        kill(con->pid, SIGKILL);
                }
        }
index 9000c95b9c0cb85a01320368be3d60631cc7da2a..52a7874c79ed1731926a71d183dabda7911b08f6 100644 (file)
@@ -609,7 +609,7 @@ set_hardware_clock_exact(const time_t sethwtime,
                if (debug >= 10) {
                        int usec = random() % 1000000;
                        printf(_("sleeping ~%d usec\n"), usec);
-                       usleep(usec);
+                       xusleep(usec);
                }
 
                gettimeofday(&nowsystime, NULL);