Messages in this thread | | | Date | Sun, 27 Nov 2011 17:24:56 +0100 | From | Oleg Nesterov <> | Subject | Re: [RFC][PATCH 0/3] fork: Add the ability to create tasks with?given pids |
| |
On 11/25, Pedro Alves wrote: > > From the perspective of a client that is > going to use this on a live system, CLONE_CHILD_USEPIDS seems a little better, > in that the pid race is only against another task reusing the same pid,
Yes. Except you can't use on a live system at all. It simply doesn't work after the first "normal" clone() without CLONE_CHILD_USEPIDS.
Although we can probably allow CLONE_CHILD_USEPIDS for CAP_SYS_ADMIN.
> while with setting last_pid, you have a try/whoops-not-the-pid-I-want/kill/retry/rinse/repeat/ > loop racing against all fork/clone's in the system,
Yes, setting last_pid can race with another fork(). I agree this sucks. But simple ;)
Oleg.
| |