[PATCH] fix copy_process() error check