lockfile: wait using sleep_millisec() instead of select()