after the selection timeout is posted but the number executed isn't reliable. So wait for MSG_OUT rigth after the select so that the state of the script when the interruption is handled is known.