From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Sat, 05 Dec 2009 15:27:02 EST." References: <<20091205202420.855AD5B77@mail.bitblocks.com>> From: Bakul Shah Date: Sat, 5 Dec 2009 12:59:34 -0800 Message-Id: <20091205205934.60D005B77@mail.bitblocks.com> Subject: Re: [9fans] ideas for helpful system io functions Topicbox-Message-UUID: a8ecf334-ead5-11e9-9d60-3106f5b1d025 On Sat, 05 Dec 2009 15:27:02 EST erik quanstrom wrote: > > To be precise, both fds have their own pointer (or offset) > > and reading N bytes from some offset O must return the same > > bytes. > > wrong. /dev/random is my example. You cut out the bit about buffering where I explained what I meant. As I said, those are the semantics I would choose so by definition it is not "wrong"! Though it may not do what you expect. As a matter of fact I do see a use case for /dev/random for getting repeatable random numbers! If you want an independet stream of random numbers, just open /dev/random again (or dup()), and not use fdfork().