<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Sprechblasentext Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.SprechblasentextZchn
{mso-style-name:"Sprechblasentext Zchn";
mso-style-priority:99;
mso-style-link:Sprechblasentext;
font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.E-MailFormatvorlage20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang="DE" link="blue" vlink="purple"><div class="WordSection1"><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Sorry, I found a fix. Just wrap the code within ignore-errors (or similar).<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Regards<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Andreas<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt"><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";mso-fareast-language:DE"> Openmcl-devel [mailto:openmcl-devel-bounces@clozure.com] <b>Im Auftrag von </b>Andreas Thiele<br><b>Gesendet:</b> Montag, 1. Dezember 2014 12:42<br><b>An:</b> openmcl-devel@clozure.com<br><b>Betreff:</b> [Openmcl-devel] Bug when writing to broken pipe?<o:p></o:p></span></p></div></div><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal"><span lang="EN-US">Dear All,<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">I came across a tiny problem which I would consider a bug: I write a lengthy output to *<b>standard-output</b>* 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.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">In my case I pipe to linux less and terminate less by pressed letter q very soon.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">My test code is:<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">(defun test ()<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> (loop :for i :from 1 :to 10000 :do<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> (format t "This is a test line to produce a lengthy output.~%")))<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">(ccl:save-application "test" <o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> :toplevel-function #'test<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> :error-handler :quit<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> :prepend-kernel t)<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">Tested with ccl-1.9 32 and 64 and ccl-1.10 32-bit.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">fwgz@fwgz14:~/cvsrep-bug$test | less<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">and pressing ‘q’ very soon leads to<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR (STREAM T T)>, in process toplevel(2).<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Broken pipe during write<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR (STREAM T T)>, in process toplevel(2).<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Broken pipe during write<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR (STREAM T T)>, in process toplevel(2).<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Broken pipe during write<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR (STREAM T T)>, in process toplevel(2).<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Error: on #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (PIPE/1) #x18353C96> :<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> Broken pipe during write<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::STREAM-IO-ERROR (STREAM T T)>, in process toplevel(2).<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">Unrecoverable stack overflow.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">? for help<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">[5134] Clozure CL kernel debugger:<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">Any hints very welcome.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US">Best Regards<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">Andreas Thiele<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p></div></div></body></html>