On 2012-08-11 01:02, Rolf Eike Beer wrote:
Am Samstag 11 August 2012, 00:11:37 schrieb Michael Palimaka:
So you are saying:
- readAll clears the buffer
- readLine unconditionally calls readAll
- readLine may be called multiple times to read multiple lines
Is that correct?
That's how the code looks to me.
That set of statements is contradictory - how can the buffer be cleared,
but then read from again?
(Again, I note that in testing, calling readAll then readLine is
successful.)
I.e. readLine() then returns something? Are you sure this has been written by
the process before readAll() was called? Strange.
Yes - the chfn implementation I am using writes "permission denied" and
immediately terminates. With the latest diff, readAll.isEmpty is false
so readLine is then executed.
Best regards,
Michael