Skip to content

Commit 19ea1bf

Browse files
committed
Eliminate waitpid for Windows
1 parent c0d3ab5 commit 19ea1bf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/utils/remote.c

+7
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,16 @@ static void kill_child(void)
7070

7171
void wait_ssh(void)
7272
{
73+
/*
74+
* We need to wait termination of SSH process to eliminate zombies.
75+
* There is no waitpid() function at Windows but there are no zombie processes caused by lack of wait/waitpid.
76+
* So just disable waitpid for Windows.
77+
*/
78+
#ifndef WIN32
7379
int status;
7480
waitpid(child_pid, &status, 0);
7581
elog(LOG, "SSH process %d is terminated with status %d", child_pid, status);
82+
#endif
7683
}
7784

7885
#ifdef WIN32

0 commit comments

Comments
 (0)