From 879368a3d0db4ea06696af586c06a21c651ad8cc Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 18 Feb 2017 12:32:29 +0100 Subject: [PATCH] add check if fork failed --- tools/proxy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/proxy.c b/tools/proxy.c index 31eec3528..66f7c00aa 100644 --- a/tools/proxy.c +++ b/tools/proxy.c @@ -381,6 +381,9 @@ static int init_qemu(char *path) fprintf(stderr, "Didn't find qemu\n"); exit(1); + } else if (id < 0) { + perror("fork"); + exit(1); } // move the parent process to the end of the queue