diff options
author | Ryo Nakamura <upa@haeena.net> | 2023-03-04 16:48:26 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2023-03-04 16:48:26 +0900 |
commit | e67b7468e530980964cb5264cccca320b29dbdbf (patch) | |
tree | ee5ca83f031c8eb06fbb8ae0e3a260f9cd92a7d0 /src/mscp.c | |
parent | f9c8dec389f54ea0d38edd778c97afb4e0ff5ebd (diff) |
use setitimer instead of alarm, and print message.
print_stat now prints messages per interval.
ToDo:
- realtime message printing
- use timer_create instead of setitimer (mscOS has different one)
Diffstat (limited to 'src/mscp.c')
-rw-r--r-- | src/mscp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -198,13 +198,13 @@ struct mscp *mscp_init(const char *remote_host, return NULL; } - m->msg_fd = o->msg_fd; mprint_set_severity(o->severity); if (validate_and_set_defaut_params(o) < 0) goto free_out; memset(m, 0, sizeof(*m)); + m->msg_fd = o->msg_fd; INIT_LIST_HEAD(&m->src_list); INIT_LIST_HEAD(&m->path_list); INIT_LIST_HEAD(&m->chunk_list); @@ -220,7 +220,7 @@ struct mscp *mscp_init(const char *remote_host, goto free_out; mpr_notice(m->msg_fd, "usable cpu cores:"); for (n = 0; n < m->nr_cores; n++) - mpr_notice(m->msg_fd, "%d", m->cores[n]); + mpr_notice(m->msg_fd, " %d", m->cores[n]); mpr_notice(m->msg_fd, "\n"); } |