On 02 May 2013, at 22:00, silvioprog wrote:

> 
> Lines 277 and 278. That is, I already do that. The problem now is how to stop 
> the "Accept" but without errors.

Using linux (or some other unix like thingie), you could cancel the thread 
using pthread_cancel(), the call will then return immediately with a specific 
(can't remember which) error code in errno (socketerror in this case I believe).

Problem with pthread_cancel is that there are quite a lot of cancelation 
points, see http://stackoverflow.com/questions/433989/posix-cancellation-points 
, so be careful with this approach.

Another way would be to use a non-blocking socket to accept connections... 

--
Ewald

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to