[CRIU] [PATCH 5/6] dump: store signals in core->tc->signals, instead of writing them to signal_p/s*.img

Pavel Emelyanov xemul at parallels.com
Wed Aug 6 00:05:20 PDT 2014


> -static int dump_task_signals(pid_t pid, struct pstree_item *item,
> -		struct cr_fdset *cr_fdset)
> +static int dump_task_signals(pid_t pid, struct pstree_item *item, SignalsEntry *signals)
>  {
>  	int i, ret;
>  
> -	ret = dump_signal_queue(pid, fdset_fd(cr_fdset, CR_FD_SIGNAL), true);
> +	ret = dump_signal_queue(pid, &signals->shared, true);
>  	if (ret) {
>  		pr_err("Can't dump pending signals (pid: %d)\n", pid);
>  		return -1;
>  	}
>  
> +	signals->n_private_ = item->nr_threads;

n_private_ ? I mean -- with the _ at the end? Does it compile?

> +	signals->private_ = xmalloc(sizeof(*signals->private_) * signals->n_private_);
> +	if (!signals->private_)
> +		return -1;
> +
>  	for (i = 0; i < item->nr_threads; i++) {
> -		ret = dump_thread_signals(&item->threads[i]);
> +		ret = dump_signal_queue(item->threads[i].real, &signals->private_[i], false);
>  		if (ret)
>  			return -1;
>  	}



More information about the CRIU mailing list