Working implementation of waiting for frozened processes.