diff options
author | Nate Straz <nstraz@redhat.com> | 2007-02-14 16:36:25 +0000 |
---|---|---|
committer | Nathan Straz <nstraz@redhat.com> | 2008-09-23 09:37:47 -0400 |
commit | a6522734ec60a5e3d90ef6b0b8ef86039bd61c3e (patch) | |
tree | ca4d7c2191e4b26bc1802bf5123c4849f9d26e91 /btimed.c | |
parent | cfe91a2ec93a33a8597cf0a3f70a850e567094df (diff) | |
download | qarsh-a6522734ec60a5e3d90ef6b0b8ef86039bd61c3e.tar.gz qarsh-a6522734ec60a5e3d90ef6b0b8ef86039bd61c3e.tar.xz qarsh-a6522734ec60a5e3d90ef6b0b8ef86039bd61c3e.zip |
Every time btimed is restarted we could get a slightly different boot time.
qarsh is the primary user of btimed, but it only sends a btime request
when it hasn't received output for 5 seconds. If output is streaming for
more than 30 seconds, btimed would exit. When the output quiets down again
and btimed starts up, it could get a slightly different uptime and round
in the opposite direction.
Diffstat (limited to 'btimed.c')
-rw-r--r-- | btimed.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -54,9 +54,6 @@ main(int argc, char **argv) /* Running out of (x)inetd the socket was duped onto stdin. */ sd = fileno(stdin); - /* We want to exit after 30 seconds of inactivity */ - alarm(30); - /* Generate the standard btime message */ memset(btimeonly, 0, BTIME_MSGLEN); local_btime = get_btime(); @@ -71,8 +68,8 @@ main(int argc, char **argv) (struct sockaddr *)&cli_addr, &cli_addr_len); if (nbytes < 0) { - /* Bail, we may have had an alarm(), or other error. - * client side resends request, no need to retry here. + /* Bail if we get an error. client side resends + * request, no need to retry here. */ syslog(LOG_INFO, "exitting"); exit(0); @@ -90,8 +87,6 @@ main(int argc, char **argv) sendto(sd, outmsg, BTIME_MSGLEN, MSG_DONTWAIT, (struct sockaddr *)&cli_addr, cli_addr_len); - /* We want to exit after 30 seconds of inactivity */ - alarm(30); } return 0; |