[PATCH 2/2] sulogin, hwclock: use xusleep() instead of usleep()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 login-utils/sulogin.c | 2 +-
 sys-utils/hwclock.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index f4d68c4..51bc582 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -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);
 		}
 	}
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index 9000c95..52a7874 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -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);
-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux