You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a program that forks repeatedly inside a Progress.with_reporter call, and it seems each time it happens, there's a return carriage that gets printed to the screen. Next time the bar is rendered, it is added below the former render, instead of replacing it, like in:
I'm not absolutely sure this is due to forking, but I highly suspect it. I see no reason for this, however. Maybe there's something I could call in the child process to disable any further interaction with the terminal?
The text was updated successfully, but these errors were encountered:
I think this is due to the default hide_cursor which registers an at_exit handler that prints a newline and re-enables the cursor.
Try this, it fixed the problem for me:
let config =Progress.Config.v ~hide_cursor:false()inProgress.with_reporters ~config
This could probably be fixed by checking the pid of the process in at_exit, and only running the at_exit handler if it matches the PID of the process it got registered in.
I have a program that forks repeatedly inside a
Progress.with_reporter
call, and it seems each time it happens, there's a return carriage that gets printed to the screen. Next time the bar is rendered, it is added below the former render, instead of replacing it, like in:I'm not absolutely sure this is due to forking, but I highly suspect it. I see no reason for this, however. Maybe there's something I could call in the child process to disable any further interaction with the terminal?
The text was updated successfully, but these errors were encountered: