[CRIU] [PATCH 12/12] cpuinfo: rpc -- Add CPUINFO_DUMP/CPUINFO_CHECK commands

Cyrill Gorcunov gorcunov at gmail.com
Tue Sep 30 11:21:23 PDT 2014


On Tue, Sep 30, 2014 at 10:11:39PM +0400, Pavel Emelyanov wrote:
> On 09/30/2014 10:08 PM, Cyrill Gorcunov wrote:
> > On Tue, Sep 30, 2014 at 09:57:45PM +0400, Pavel Emelyanov wrote:
> >>> +	wait(&status);
> >>> +	if (!WIFEXITED(status) || WEXITSTATUS(status))
> >>> +		goto out;
> >>> +
> >>> +	success = true;
> >>> +out:
> >>> +	resp.type = msg->type;
> >>> +	resp.success = success;
> >>> +
> >>> +	ret = send_criu_msg(sk, &resp);
> >>> +
> >>> +	if (success == false || ret || !msg->keep_open) {
> >>> +		criu_req__free_unpacked(msg, NULL);
> >>> +		msg->keep_open = false;
> >>> +		ret = -1;
> >>
> >> Why do we need this? If ret is not 0, then the ct_service_work
> >> will just go ahead and terminate.
> > 
> > ret might be 0 but success = false,
> 
> In this case cr_service_work() would free the req and go on the
> 2nd lap.
> 
> > or reverse success = true and ret = -1,
> 
> How???

	ret = send_criu_msg(sk, &resp);

there is no guarantee that send_criu_msg won't fail


More information about the CRIU mailing list