Issues with Socket.accept() and SIGUSR1

Nemanja Boric 4burgos at gmail.com
Fri Dec 8 23:23:48 UTC 2017


On Friday, 8 December 2017 at 22:27:41 UTC, LeqxLeqx wrote:
> Hello,
>
> I've been trying to create a small server-client program, and 
> I've run into a rather strange problem. There's a thread 
> separate from the main which accepts incoming connections. The 
> established connections are then passed over to the main thread 
> for the actual logic of the interaction, and the accept thread 
> loops back to listen for further connections.
>
> [...]

Looking the trace, your thread 2 had not raised, but received a 
signal. I have a feeling GC collection starts from another 
thread, and GC sends SIGUSR1 to all (registered to the runtime) 
threads to pause them, while the collection is running. As Adam 
said, repeat the call (check how Phobos sockets are handling this 
and what you should do), and you probably want to instruct the 
debugger to ignore SIGUSR1/2.


More information about the Digitalmars-d mailing list