[Openmcl-devel] Bug when writing to broken pipe?
Andreas Thiele
andreas at atp-media.de
Mon Dec 1 03:42:23 PST 2014
Dear All,
I came across a tiny problem which I would consider a bug: I write a lengthy
output to *standard-output* on a Debian Linux. When I pipe the output to
another linux program and the pipe get broken, closure lisp crashes. Is this
behavior correct? If so, how can I avoid the crash.
In my case I pipe to linux less and terminate less by pressed letter q very
soon.
My test code is:
(defun test ()
(loop :for i :from 1 :to 10000 :do
(format t "This is a test line to produce a lengthy output.~%")))
(ccl:save-application "test"
:toplevel-function #'test
:error-handler :quit
:prepend-kernel t)
Tested with ccl-1.9 32 and 64 and ccl-1.10 32-bit.
fwgz at fwgz14:~/cvsrep-bug$test | less
and pressing 'q' very soon leads to
> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR
(STREAM T T)>, in process toplevel(2).
> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :
> Broken pipe during write
> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR
(STREAM T T)>, in process toplevel(2).
> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :
> Broken pipe during write
> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR
(STREAM T T)>, in process toplevel(2).
> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :
> Broken pipe during write
> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR
(STREAM T T)>, in process toplevel(2).
> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :
> Broken pipe during write
> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR
(STREAM T T)>, in process toplevel(2).
Unrecoverable stack overflow.
? for help
[5134] Clozure CL kernel debugger:
Any hints very welcome.
Best Regards
Andreas Thiele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20141201/a590fd6e/attachment.htm>
More information about the Openmcl-devel
mailing list