do_exit and process termination

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I've another problem with my kernel module.
I want to stop the threads I'm monitoring when they are going to terminate 
their execution in order to can restore them to a previous state.
To do this, I've substituted the function related with the sys_exit system 
call with the following one:

static asmlinkage int cmc_sys_exit(int error_code)
{
  if (current is one of the thread I'm monitoring){
   send_sig(SIGSTOP,current,1);

   return 0;
  }


 
 return original_sys_exit(error_code);
}

where original_sys_exit is the pointer to the original function.

After the executing of this function, things seems to go well, as all threads 
stop the execution and do not terminate; but when they are resumed to a 
previous state, sometimes not all threads restart the execution (someone 
terminate) or can happen that all restart their execution from the previous 
state but when they re-terminate their execution they not stop (as in the 
first execution), they segfault and exit.
What goes wrong?

Thanks.
Vincenzo Mallozzi. 

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux