Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd57b65f

Browse files
committed
Wait for ssh process completion in fio_disconnect
1 parentabfb2b5 commitd57b65f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

‎src/pg_probackup.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ extern bool in_backup_list(parray *backup_list, pgBackup *target_backup);
577577
externintget_backup_index_number(parray*backup_list,pgBackup*backup);
578578
externboollaunch_agent(void);
579579
externvoidlaunch_ssh(char*argv[]);
580+
externvoidwait_ssh(void);
580581

581582
#defineCOMPRESS_ALG_DEFAULT NOT_DEFINED_COMPRESS
582583
#defineCOMPRESS_LEVEL_DEFAULT 1

‎src/utils/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ fio_disconnect(void)
344344
SYS_CHECK(close(fio_stdout));
345345
fio_stdin=0;
346346
fio_stdout=0;
347+
wait_ssh();
347348
}
348349
}
349350

‎src/utils/remote.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,22 @@ static int split_options(int argc, char* argv[], int max_options, char* options)
5353
}
5454

5555
staticintchild_pid;
56+
5657
#if0
5758
staticvoidkill_child(void)
5859
{
5960
kill(child_pid,SIGTERM);
6061
}
6162
#endif
6263

64+
65+
voidwait_ssh(void)
66+
{
67+
intstatus;
68+
waitpid(child_pid,&status,0);
69+
elog(LOG,"SSH process %d is terminated with status %d",child_pid,status);
70+
}
71+
6372
#ifdefWIN32
6473
voidlaunch_ssh(char*argv[])
6574
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp