Commit 403a74c7 authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Pavel Emelyanov

test/vfork00: directly _exit() instead of exec() in vforked proccess

execlp() fails when we run vfork00 test inside namespace because we don't have
'/bin/true' there. Instead of execlp() in vfork-child we can just _exit().
Signed-off-by: 's avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 0195c999
......@@ -37,9 +37,9 @@ int main(int argc, char ** argv)
/* wait for signal in _both_ branches */
test_waitsig();
/* vforked guy shouldn't return, hence we exec() */
/* vforked guy shouldn't return, hence we _exit() */
if (pid == 0)
execlp("/bin/true", "true", NULL);
_exit(0);
if (wait(&ret2) != pid)
ret = errno;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment