mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-01-22 11:44:34 +02:00
Rewrite remote ssh support for Windows
This commit is contained in:
parent
8aba8e8940
commit
66d33a188e
@ -63,11 +63,14 @@ static void kill_child(void)
|
||||
#ifdef WIN32
|
||||
void launch_ssh(char* argv[])
|
||||
{
|
||||
int infd = atoi(argv[2]);
|
||||
int outfd = atoi(argv[3]);
|
||||
|
||||
SYS_CHECK(close(STDIN_FILENO));
|
||||
SYS_CHECK(close(STDOUT_FILENO));
|
||||
|
||||
SYS_CHECK(dup2(outfd[0], STDIN_FILENO));
|
||||
SYS_CHECK(dup2(infd[1], STDOUT_FILENO));
|
||||
SYS_CHECK(dup2(infd, STDIN_FILENO));
|
||||
SYS_CHECK(dup2(outfd, STDOUT_FILENO));
|
||||
|
||||
SYS_CHECK(execvp(argv[4], argv+4));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user