From d7e2fbb6a295dbed87201183768295e7ea4694ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 12 Feb 2020 20:26:50 +0100 Subject: [PATCH] I/O [NT]: Fixed some issues with debug_fd_openpty(). It now seems to work. --- src/fdlib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fdlib.c b/src/fdlib.c index 3c038705df..a46a2585ae 100644 --- a/src/fdlib.c +++ b/src/fdlib.c @@ -2811,10 +2811,10 @@ PMOD_EXPORT int debug_fd_openpty(int *master, int *slave, slave_fd = allocate_fd(FD_PTY, (HANDLE)slave_pty); if (slave_fd < 0) goto fail; - if (!CreatePipe(&master_pty->write_pipe, &slave_pty->read_pipe, NULL, 0)) { + if (!CreatePipe(&slave_pty->read_pipe, &master_pty->write_pipe, NULL, 0)) { goto win32_fail; } - if (!CreatePipe(&slave_pty->write_pipe, &master_pty->read_pipe, NULL, 0)) { + if (!CreatePipe(&master_pty->read_pipe, &slave_pty->write_pipe, NULL, 0)) { goto win32_fail; } @@ -2827,8 +2827,8 @@ PMOD_EXPORT int debug_fd_openpty(int *master, int *slave, sz.Y = winp->ws_row; } - if (FAILED(Pike_NT_CreatePseudoConsole(sz, slave_pty->write_pipe, - slave_pty->read_pipe, + if (FAILED(Pike_NT_CreatePseudoConsole(sz, slave_pty->read_pipe, + slave_pty->write_pipe, 0, &master_pty->conpty))) { goto win32_fail; } -- GitLab