Am 18.09.2014 16:30, schrieb Luís Marques:

On Tue, 16 Sep 2014 02:30:03 GMT, Luís Marques wrote:

If I have an active TcpConnection, SIGINT and SIGTERM do not quit the program -- until the connection terminates (even though SIGINT / ctrl-C returns control to the shell, making it seem like it has terminated). In my case, I have an infinite TCP stream, so I would like to be able to interrupt the TCP download and gracefully terminate the program. Is there a better way to accomplish this shutdown than just SIGKILLing the program?

This only seems to happen in a module constructor, not on a runTask task.

Ah okay, that's because Ctrl+C basically triggers a call to
exitEventLoop, but while the module constructors are still run, there
is no event loop running, yet - only a temporary implicit event loop for
each blocking operation.

The question is what would be the best thing to do. Throw an
InterruptException or simply call exit(-2) - or anything else?