[CRIU] [PATCH 2/8] sig: Don't feed pid argument to prepare_sigactions

Andrew Vagin avagin at parallels.com
Wed Aug 6 05:56:44 PDT 2014


Acked-by: Andrew Vagin <avagin at parallels.com>

On Wed, Aug 06, 2014 at 04:24:17PM +0400, Pavel Emelyanov wrote:
> We don't need pid in any of these calls actually, they are
> all legacy from the old days. I plan to move the call to
> prepare_sigactions, so remove the pid argument in advance.
> 
> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
> ---
>  cr-restore.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index 1cb659b..e34e8a6 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -614,8 +614,9 @@ static int open_vmas(int pid)
>  }
>  
>  static rt_sigaction_t sigchld_act;
> -static int prepare_sigactions(int pid)
> +static int prepare_sigactions(void)
>  {
> +	int pid = current->pid.virt;
>  	rt_sigaction_t act;
>  	int fd_sigact;
>  	SaEntry *e;
> @@ -715,7 +716,7 @@ static int restore_one_alive_task(int pid, CoreEntry *core)
>  	if (prepare_file_locks(pid))
>  		return -1;
>  
> -	if (prepare_sigactions(pid))
> +	if (prepare_sigactions())
>  		return -1;
>  
>  	if (open_vmas(pid))
> -- 
> 1.8.4.2
> 
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list