Use gdb::waitpid instead of plain waitpid, making sure that EINTR is handled. Tested on x86_64-linux.