[CRIU] [PATCH 12/14] restore: set up a handler for collecting signals from zombies

Andrew Vagin avagin at parallels.com
Fri Jan 18 06:37:48 EST 2013


On Fri, Jan 18, 2013 at 01:13:20PM +0400, Pavel Emelyanov wrote:
> On 01/18/2013 01:11 PM, Andrew Vagin wrote:
> > On Fri, Jan 18, 2013 at 12:04:11PM +0400, Pavel Emelyanov wrote:
> >>> @@ -40,6 +41,20 @@
> >>>  static struct task_entries *task_entries;
> >>>  static futex_t thread_inprogress;
> >>>  
> >>> +asm (								\
> >>> +	"nop\n"							\
> >>> +	".align 16\n"						\
> >>> +	"__cr_restore_rt:\n"					\
> >>> +	"       movq $"__stringify(__NR_rt_sigreturn)", %rax\n"	\
> >>> +	"       syscall"					\
> >>> +);
> >>
> >> What's this?
> > 
> > I copied this code from glibc. We need it, because glibc are not
> > avaliable in restorer.
> 
> Can we have it not in asm? Like
> 
> static void cr_restore_rt(void)
> {
> 	sys_sigreturn();
> }
> 
> with proper sigreturn declaration in syscall.def?

Looks like we can. Thanks
> 
> >>
> >>> +extern void cr_restore_rt (void) asm ("__cr_restore_rt")
> >>> +			__attribute__ ((visibility ("hidden")));
> >>> +
> >>> +static void sigzombie_handler(int signal, siginfo_t *siginfo, void *data)
> >>> +{
> >>> +}
> >>> +
> >>>  static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
> >>>  {
> >>>  	char *r;
> > .
> > 
> 
> 


More information about the CRIU mailing list