[CRIU] [PATCH] zdtm_ct: call setsid() to move in another autogroup

Andrey Vagin avagin at openvz.org
Sat Aug 16 03:39:49 PDT 2014


Transition and streaming tests can create many processes
which are using cpu. CPU should be divided between tests fairly.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm_ct.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/zdtm_ct.c b/test/zdtm_ct.c
index 4524ab8..1374f78 100644
--- a/test/zdtm_ct.c
+++ b/test/zdtm_ct.c
@@ -20,6 +20,11 @@ int main(int argc, char **argv)
 		return 1;
 	pid = fork();
 	if (pid == 0) {
+		if (setsid() == -1) {
+			fprintf(stderr, "setsid: %m\n");
+			return 1;
+		}
+
 		if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) {
 			fprintf(stderr, "mount(/, S_REC | MS_PRIVATE)): %m");
 			return 1;
-- 
1.9.3



More information about the CRIU mailing list