From: Peter <p.spamcatcher@rimuhosting.com>
To: xen-devel@lists.xensource.com
Subject: xentop.c trivial fix
Date: Mon, 08 Jan 2007 09:43:18 +1300 [thread overview]
Message-ID: <45A15B66.9060008@rimuhosting.com> (raw)
Hi.
I run:
xentop --delay=30 --iterations 2 --batch
I get output, 30 second delay, output, 30 second delay, exit.
I want output, 30 seconds delay, output, exit.
The following patch implements that behavior and I think this is likely
the desired behavior anyway. i.e. just a trivial bug in code.
# diff -U5 xentop.c.orig xentop.c
--- xentop.c.orig 2006-12-29 08:05:13.000000000 +0000
+++ xentop.c 2006-12-29 08:06:40.000000000 +0000
@@ -1053,13 +1053,13 @@
} else {
do {
gettimeofday(&curtime, NULL);
top();
oldtime = curtime;
- sleep(delay);
if ((!loop) && !(--iterations))
break;
+ sleep(delay);
} while (1);
}
/* Cleanup occurs in cleanup(), so no work to do here. */
Regards, Peter
reply other threads:[~2007-01-07 20:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45A15B66.9060008@rimuhosting.com \
--to=p.spamcatcher@rimuhosting.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.