From: "Paul Rolland" <rol@witbe.net>
To: "'Paul Jackson'" <pj@sgi.com>, "'Paul Rolland'" <rol@witbe.net>
Cc: <hancockr@shaw.ca>, <kernel@wildsau.enemy.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: procfs uglyness caused by "cat"
Date: Tue, 14 Mar 2006 19:45:15 +0100 [thread overview]
Message-ID: <007301c64797$6f63e7d0$b600a8c0@cortex> (raw)
In-Reply-To: <20060314095940.7be639e7.pj@sgi.com>
Hello,
> main()
> {
> char c;
> int fd = open("/proc/uptime", 0);
> while (read(fd, &c, 1) == 1) {
> write(1, &c, 1);
> sleep(1);
> }
> }
Yes, much better, same result for 2.2.x and 2.4.31 :
bash-2.05# cat /proc/uptime; ./test2
112049.81 111665.11
112054.89 111670.29
The result is more "correct", but I guess this makes it worse for
Herbert, as uptime_read_proc() is then called for each character...
Paul
next prev parent reply other threads:[~2006-03-14 18:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5Qfgo-3At-15@gated-at.bofh.it>
2006-03-14 14:35 ` procfs uglyness caused by "cat" Robert Hancock
2006-03-14 15:33 ` Paul Rolland
2006-03-14 17:59 ` Paul Jackson
2006-03-14 18:45 ` Paul Rolland [this message]
2006-03-15 8:06 ` Herbert Rosmanith
2006-03-15 8:23 ` Herbert Rosmanith
2006-03-14 10:43 Herbert Rosmanith
2006-03-14 15:57 ` Paul Jackson
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='007301c64797$6f63e7d0$b600a8c0@cortex' \
--to=rol@witbe.net \
--cc=hancockr@shaw.ca \
--cc=kernel@wildsau.enemy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.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.