Re: Problem closing a socket while thread blocks in read()
From: Lorinczy Zsigmond / Domonyik Mariann (lzsiga_at_axelero.hu)
Date: 03/02/04
- Next message: Martin Woolley: "Re: Issue with EOL and serial port access"
- Previous message: Nick Landsberg: "Re: Quick questions on Shared Memory"
- In reply to: Peter Ammon: "Problem closing a socket while thread blocks in read()"
- Next in thread: Joe Halpin: "Re: Problem closing a socket while thread blocks in read()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 02 Mar 2004 19:44:46 +0100
Peter Ammon wrote:
>
> I have a child thread that's blocking in a read() on a TCP socket. At
> the same time, my main thread closes the socket via close(). When this
> happens, read() never returns in the child thread and the socket is not
> reported as closed to the other end until the program exits.
Why should you close the socket in the main thread?
- Next message: Martin Woolley: "Re: Issue with EOL and serial port access"
- Previous message: Nick Landsberg: "Re: Quick questions on Shared Memory"
- In reply to: Peter Ammon: "Problem closing a socket while thread blocks in read()"
- Next in thread: Joe Halpin: "Re: Problem closing a socket while thread blocks in read()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|