tcplxc: close the socket if the shell exits