Fix a hanging problem on GNU Screen/tmux