From 8a4ef8efd02400559400eb4401244e2dde7b43e2 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 21 Feb 2017 09:18:07 +0100 Subject: [PATCH] check if the proxy use qemu before opening qemu's tmp files --- tools/proxy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/proxy.c b/tools/proxy.c index 7031245de..ec5a42eb5 100644 --- a/tools/proxy.c +++ b/tools/proxy.c @@ -84,8 +84,11 @@ int init_uhyve(char *path); static void fini_qemu(void) { + FILE* fp = NULL; + // try to kill qemu - FILE* fp = fopen(pidname, "r"); + if (qemu) + fp = fopen(pidname, "r"); if (fp) { pid_t id = -1;