Re: RFC: Enforcing process hierarchies (`prctl` related)

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

 



On Sat, Aug 25, 2012 at 8:48 PM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
> Hi........
>
> On Fri, Aug 24, 2012 at 11:20 PM, Ciprian Dorin Craciun
> <ciprian.craciun@xxxxxxxxx> wrote:
>>     (d) (last resort solution we have today) iterate through
>> `/proc/$PID` and find all the controller children, SIGKILL them, and
>> continue until no process is found, then die; but it doesn't solve
>> (C)...
>
> IMHO this is the way to do it....but, to tackle C, maybe a signal
> handler to SIGTERM could do it. But wait, I forget whether SIGTERM
> could be intercepted.....

    Solving (C) (that is terminating all children if the controller
suddenly dies) is impossible to achieve from the controller process
itself as if it dies it can't proceed to killing the children
processes, thus they are leaking to the next process reaper (most
probably `init` itself). (The only way to solve this is to use the
`clone (CLONE_NEWPID)`, but as said you need special privileges to
call it...)

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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