]> 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)
commite887cc3bd09987f7c25517736003df9485d8116b
tree01d0d2b9d72eea0300a081531ab6b9f302afe670
parent12385b9a1047e684d9d0398eeefd9214b27321f0
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