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

Re: [Publicity] Technical / puzzle blog post on killing processes



On Thu, Apr 19, 2018 at 06:27:19PM +0100, George Dunlap wrote:
> The basic problem here is a race condition.  What `killall` does is:
> 
> 1. Read the list of processes
> 2. Call `kill(pid, sig)` on each one
> 
> In between 1 and each instance of 2, the kernel tasklist lock is
> released (since it has to return from the hypercall), giving the rogue

                                            ^ syscall ;-)

> process a chance to fork.  Indeed, it has many chances; since the
> second one takes a non-negligible amount of time, by the time you
> manage to find the rogue process, it's likely already forked, and
> perhaps even exited.

-- 
Anthony PERARD

_______________________________________________
Publicity mailing list
Publicity@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/publicity

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.