<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello group!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I would be most grateful for your help. 
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I am developing a Linux application for ppc. The 
ppc Linux distribution I am using is ELDK 3.0. I am having a problem with 
canceling a thread blocked on read. The thread tries to read data from a HDLC 
device. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I&nbsp;tried </FONT><FONT face=Arial size=2>to 
cancel the read thread with thread_cancel() called from another 
thread&nbsp;which did not work as I would&nbsp;like, because the&nbsp;reader 
thread remains blocked until there&nbsp;is data arrived. I also tried to set up 
a signal handler (SIGTERM) for the thread and then to call pthraed_kill() from 
another thread&nbsp;which would cause the read() to return&nbsp;-1 with an errno 
of EINTR which would&nbsp;indicate the reader thread&nbsp;to terminate itself. 
However, the read does not return and the reader thread remains blocked... 
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Any suggestions as to what to do next?</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT>
<DIV><FONT face=Arial size=2>Kindest regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Branko</DIV></FONT>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>