Return error from wait_for_events if num_procs <= 0.