#30 open-pipe eof problem

closed
nobody
None
5
2012-07-25
2005-05-31
Julian Stecklina
No

(loop with stream = (ext:open-pipe "dmesg")
for line = (read-line stream t nil)
while line collect line)
Unexpected end of file on #.
Broken at READ-LINE.

NIL should be returned from read-line instead of an
error being thrown.

Discussion

  • Logged In: YES
    user_id=253605

    Not really. Your code has one argument too much when calling
    READ-LINE.
    If you do not want an error signaled, then it should be
    (read-line stream nil nil)

     


Anonymous


Cancel   Add attachments