[CRIU] [PATCH v2 1/2] test/vfork00: directly _exit() instead of exec() in vforked proccess
Andrey Ryabinin
aryabinin at virtuozzo.com
Fri Feb 26 07:49:04 PST 2016
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: Andrey Ryabinin <aryabinin at virtuozzo.com>
Cc: Andrew Vagin <avagin at virtuozzo.com>
---
test/zdtm/static/vfork00.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/zdtm/static/vfork00.c b/test/zdtm/static/vfork00.c
index d61bb35..002ddee 100644
--- a/test/zdtm/static/vfork00.c
+++ b/test/zdtm/static/vfork00.c
@@ -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;
--
2.4.10
More information about the CRIU
mailing list