summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2022-11-18 13:47:24 +0900
committerRyo Nakamura <upa@haeena.net>2022-11-18 13:47:24 +0900
commitb8d58b1fba1d29d36b98dd19e544ff3002b286e4 (patch)
treebbd7bacbcfee89ca00b9341ccb7888cd2ed7a0fc /src
parent5ede4dc122b0c5b0dd1aa64cd7fd05719b86eaa7 (diff)
tiny fix
- set ssh nonblocking before closing sftp session - fix pprint for core mask
Diffstat (limited to 'src')
-rw-r--r--src/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 2fe8ee9..586dd61 100644
--- a/src/main.c
+++ b/src/main.c
@@ -370,10 +370,10 @@ int main(int argc, char **argv)
if (coremask) {
if (expand_coremask(coremask, &cores, &nr_cores) < 0)
return -1;
- pprint(1, "cpu cores:");
+ pprint(2, "cpu cores:");
for (n = 0; n < nr_cores; n++)
- pprint(1, " %d", cores[n]);
- pprint(1, "\n");
+ pprint(2, " %d", cores[n]);
+ pprint(2, "\n");
}
/* create control session */
@@ -492,8 +492,12 @@ out:
void mscp_copy_thread_cleanup(void *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);
+ }
t->finished = true;
__sync_synchronize();
}