commit 4ed553c51d08f0ad08f9b7534825034d1f84df72
parent acdffb8b87d1775fc79113809135a449d70b8f92
Author: Jan Pobrislo <ccx@te2000.cz>
Date: Tue, 8 Oct 2024 23:55:29 +0000
Fix open() return value check
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/spawn-pty.c b/src/spawn-pty.c
@@ -65,7 +65,7 @@ void exec_terminal(const char *term_env, const char **ptmx_argv, const char **pt
}
/* open without O_NOCTTY so controlling terminal gets set */
pty_fd = open(pts_name, O_RDWR);
- if (ptmx_fd < 0) {
+ if (pty_fd < 0) {
strerr_dief1sys(111, "open(pty)");
}
if (tcsetpgrp(pty_fd, getpid()) < 0) { /* set controlling terminal */