diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-11-02 13:56:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-11-02 13:56:56 +0000 |
commit | 61ab27dae7bba8ddb359a3aa74377d4d6a252aad (patch) | |
tree | 8e2c4cc2ea3ce8afd71903a2b85a640b730c34d2 /usr.sbin/lpr | |
parent | e13c6a604cc98d7a06444e75ecedcf873efab0ce (diff) |
use nanosleep() instead of select(); ok jsing
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r-- | usr.sbin/lpr/common_source/common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index bf764c81a43..fd48614df1c 100644 --- a/usr.sbin/lpr/common_source/common.c +++ b/usr.sbin/lpr/common_source/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.36 2014/10/16 04:17:48 deraadt Exp $ */ +/* $OpenBSD: common.c,v 1.37 2014/11/02 13:56:55 deraadt Exp $ */ /* $NetBSD: common.c,v 1.21 2000/08/09 14:28:50 itojun Exp $ */ /* @@ -415,13 +415,13 @@ done: void delay(int n) { - struct timeval tdelay; + struct timespec tdelay; if (n <= 0 || n > 10000) fatal("unreasonable delay period (%d)", n); tdelay.tv_sec = n / 1000; - tdelay.tv_usec = n * 1000 % 1000000; - (void) select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tdelay); + tdelay.tv_nsec = n * 1000000 % 1000000000; + nanosleep(&tdelay, NULL); } __dead void |