11 Apr 2007 22:03
Reading special file blocks forever
Philippe Mechaï <pmechai <at> free.fr>
2007-04-11 20:03:41 GMT
2007-04-11 20:03:41 GMT
Hi,
I am fairly new to Lisp so maybe I'm doing something wrong but I can't
tell what.
I have the following piece of code:
------------------------------------------
(with-open-file (in "/proc/asound/cards")
(with-standard-io-syntax
(do ((line (read-line in nil)
(read-line in nil)))
((null line))
(print line))))
------------------------------------------
When I load it in SBCL (v1.0 on Ubuntu x86) the program blocks forever.
I pasted below a backtrace I got after pressing CTRL-C to see what was
going on but I can't tell what the problem is.
This code works for other files, but seems to block on this file which
is a special file.
Thanks in advance for your answers.
Regards,
Philippe Mechaï
PS: the exact same code works fine in CLISP.
------------------------------------------------------------------------
(Continue reading)
RSS Feed