There’s a peculiar glitch in Windows Subsystem for Linux (WSL) where rsync will hang on a file until the window is resized. If you’ve run into this problem, we’ll give you a workaround to fix it.
Microsoft still hasn’t fixed this problem, and who knows when they will. This article indicates that the glitch was reported as early as May 2017.
For now, the best solution is to open a separate WSL terminal and execute the following command.
while killall -CHLD ssh; do sleep 0.1; done
This command will continue to loop as long as the remote rsync (over SSH) is active. It sends a SIGCHLD
signal to the process, which is ignored, but nonetheless causes the sync to proceed.
It’s a kludgy solution, but our best hope until the glitch is fixed. It’s definitely better than constantly re-sizing the terminal window to make rsync resume.
What a wonderful work-around for the problem that has been annoying me for years!
Thanks