SETUP-SLAVE-PTY: close PTY in case of error