<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 8, 2009, at 10:33 AM, danomatika wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div> On Fri, 2009-05-08 at 01:42 +0200, <a href="mailto:pd-list-request@iem.at">pd-list-request@iem.at</a> wrote:<br> <blockquote type="CITE">    <br>    <tt><font color="#1a1a1a">So right now, when [comport] is open and that device gets&nbsp; </font></tt><br>    <tt><font color="#1a1a1a">disconnected, comport freezes and Pd crashes.&nbsp; My guess is that&nbsp; </font></tt><br>    <tt><font color="#1a1a1a">comport is waiting and therefore blocking.&nbsp; It seems like the select()&nbsp; </font></tt><br>    <tt><font color="#1a1a1a">call should prevent that, any other guesses on how to prevent comport&nbsp; </font></tt><br>    <tt><font color="#1a1a1a">from locking like this?&nbsp; Many arduino users would be very happy.</font></tt><br>    <br>    <tt><font color="#1a1a1a">.hc</font></tt><br> </blockquote> Here's a short serial class for Linux (and Mac I'm sure) that uses select() ...<br> <br> I figured that part out by reading <a href="http://www.easysw.com/~mike/serial/serial.html">http://www.easysw.com/~mike/serial/serial.html</a><br> <br> It's a bit messy, I have a better one at work I can send in a day or two.</div></blockquote><div><br></div></div>Mind if we keep this on list? &nbsp;<div><br></div><div>Have you had a chance to check the performance of that? &nbsp;Martin added select() to his networking code, and things got much slower.<div><br></div><div>.hc<div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div><br class="khtml-block-placeholder"></div><div><br></div><div>----------------------------------------------------------------------------<br></div><div><br class="khtml-block-placeholder"></div><div>'You people have such restrictive dress for women,’ she said, hobbling away in three inch heels and panty hose to finish out another pink-collar temp pool day.&nbsp; -&nbsp;“Hijab Scene #2", by&nbsp;Mohja Kahf</div><br class="Apple-interchange-newline"></div></span> </div><br></div></div></body></html>