fw_att_control: another ugly way to prevent a newline

This commit is contained in:
Ban Siesta 2015-05-25 19:10:05 +01:00 committed by Lorenz Meier
parent d3fe6fd256
commit 96bfe85ceb
1 changed files with 10 additions and 7 deletions

View File

@ -1149,14 +1149,17 @@ int fw_att_control_main(int argc, char *argv[])
err(1, "start failed");
}
/* avoid memory fragmentation by not exiting start handler until the task has fully started */
while (att_control::g_control == nullptr || !att_control::g_control->task_running()) {
usleep(50000);
printf(".");
fflush(stdout);
}
printf("\n");
/* check if the waiting is necessary at all */
if (att_control::g_control == nullptr || !att_control::g_control->task_running()) {
/* avoid memory fragmentation by not exiting start handler until the task has fully started */
while (att_control::g_control == nullptr || !att_control::g_control->task_running()) {
usleep(50000);
printf(".");
fflush(stdout);
}
printf("\n");
}
exit(0);
}