From 4269ec835dff1d6abc807f27909b74e04851e1ad Mon Sep 17 00:00:00 2001 From: Sylvain LAFRASSE Date: Fri, 12 Jan 2024 12:11:24 +0100 Subject: [PATCH] Fix double call of tty_disconnect() on macOS/Darwin. --- src/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.c b/src/tty.c index 49024cd..a153f0c 100644 --- a/src/tty.c +++ b/src/tty.c @@ -1585,7 +1585,7 @@ int tty_connect(void) #elif defined(__APPLE__) if (errno == EBADF) { - goto error_read; + break; // tty_disconnect() will be naturally triggered by atexit() } #else tio_error_printf("select() failed (%s)", strerror(errno));