]> git.baikalelectronics.ru Git - kernel.git/commit
um: Fix waitpid() usage in helper code
authorRichard Weinberger <richard@nod.at>
Sun, 9 Aug 2015 19:49:07 +0000 (21:49 +0200)
committerRichard Weinberger <richard@nod.at>
Mon, 19 Oct 2015 20:53:37 +0000 (22:53 +0200)
commit88119ef74b0000368d0571718d7441f6c0384f12
tree01d0d2b9d72eea0300a081531ab6b9f302afe670
parent7fb96a9df105a2425e452a5426426375416b5de8
um: Fix waitpid() usage in helper code

If UML is executing a helper program it is using
waitpid() with the __WCLONE flag to wait for the program
as the helper is executed from a clone()'ed thread.
While using __WCLONE is perfectly fine for clone()'ed
childs it won't detect terminated childs if the helper
has issued an execve().

We have to use __WALL to wait for both clone()'ed and
regular childs to detect the termination before and
after an execve().

Reported-and-tested-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/helper.c