close master/slave pty in the shell process.