check multiprocess state to decide whether raising error or exiting