<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I found a strange behavior with open-tcp-server on MacOSX of GambitC4b20 and GambitC4b22. I was able to isolate the problem up to this point... Eval the following code </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(define (rpc-server-start)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">let</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> ((rpc-command-queue (open-tcp-server 5000)))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">    </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(thread-start!</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">     </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(make-thread</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">      </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">lambda</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> ()</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">        </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">let</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> loop ()</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">          </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">let</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> ((incoming-connection (read rpc-command-queue)))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">            </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(debug </SPAN></FONT><FONT class="Apple-style-span" color="#606060" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">"Got connection\n"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">            </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(serve-rpc-command incoming-connection)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">            </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">          </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(loop)))))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">    </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">rpc-command-queue))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(define (serve-rpc-command incoming-connection)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(</SPAN></FONT><FONT class="Apple-style-span" color="#0000FF" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">let*</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> ((command (read-line incoming-connection)))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">    </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(display (string-append command </SPAN></FONT><FONT class="Apple-style-span" color="#606060" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">"\n"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">) incoming-connection)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">    </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(display </SPAN></FONT><FONT class="Apple-style-span" color="#606060" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">"ok!\n\n"</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;"> incoming-connection)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">    </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(force-output incoming-connection)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">    </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(close-port incoming-connection)))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(define (main)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(rpc-server-start)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(loop-indefinitely)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(define (loop-indefinitely)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(thread-sleep! 1)</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(loop-indefinitely))</SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">(main)</SPAN></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Then in a Terminal type </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>telnet 127.0.0.1 5000</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>type something and then return.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>You should see:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Trying 127.0.0.1...</DIV><DIV>Connected to localhost.</DIV><DIV>Escape character is '^]'.</DIV><DIV>sdj</DIV><DIV>sdj</DIV><DIV>ok!</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Now comment out the call to "loop-indefinitely" in the (main) function. If you try the telnet again it will not work...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This is not the case in the MingW (WinXP) versions.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>It seems I cannot start a tcp-server in a thread and still get the read-eval-print loop.</DIV><DIV>Anybody can help? </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thank you,</DIV><DIV>Francois Magnan</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>