# wait for host to become online
 while true; do
 ping host -c 1 -w 3 > /dev/null && break;
 sleep 1
 done

When I press <kbd>Ctrl</kbd>+<kbd>C</kbd>, the ping receives it and exits with exit code 1 (the same as if host down).
How do I do this correctly?

Workaround: `sleep 1 || break` and pressing ^C twice.