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?