- set ssh nonblocking before closing sftp session
- fix pprint for core mask
This commit is contained in:
Ryo Nakamura
2022-11-18 13:47:24 +09:00
parent 5ede4dc122
commit b8d58b1fba

View File

@@ -370,10 +370,10 @@ int main(int argc, char **argv)
if (coremask) { if (coremask) {
if (expand_coremask(coremask, &cores, &nr_cores) < 0) if (expand_coremask(coremask, &cores, &nr_cores) < 0)
return -1; return -1;
pprint(1, "cpu cores:"); pprint(2, "cpu cores:");
for (n = 0; n < nr_cores; n++) for (n = 0; n < nr_cores; n++)
pprint(1, " %d", cores[n]); pprint(2, " %d", cores[n]);
pprint(1, "\n"); pprint(2, "\n");
} }
/* create control session */ /* create control session */
@@ -492,8 +492,12 @@ out:
void mscp_copy_thread_cleanup(void *arg) void mscp_copy_thread_cleanup(void *arg)
{ {
struct mscp_thread *t = arg; struct mscp_thread *t = arg;
if (t->sftp) if (t->sftp) {
/* XXX: sftp_free --> ssh_poll sometimes blocked with
* no responses. So wet nonblocking. */
ssh_set_blocking(sftp_ssh(t->sftp), 1);
ssh_sftp_close(t->sftp); ssh_sftp_close(t->sftp);
}
t->finished = true; t->finished = true;
__sync_synchronize(); __sync_synchronize();
} }