[CRIU] [PATCH] zdtm: clean up test_fork

Andrey Vagin avagin at openvz.org
Tue Aug 20 03:01:00 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm/lib/test.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/test/zdtm/lib/test.c b/test/zdtm/lib/test.c
index 681efab..7c950bc 100644
--- a/test/zdtm/lib/test.c
+++ b/test/zdtm/lib/test.c
@@ -32,17 +32,9 @@ TEST_OPTION(pidfile, string, "file to store pid", 1);
 
 static pid_t master_pid = 0;
 
-int proc_id = 0;
-static int proc_id_cur = 0;
-
 int test_fork_id(int id)
 {
-	pid_t pid = fork();
-	if (id < 0)
-		id = ++proc_id_cur;
-	if (pid == 0)
-		proc_id = id;
-	return pid;
+	return fork();
 }
 
 #define INPROGRESS ".inprogress"
-- 
1.8.3.1



More information about the CRIU mailing list