From 6dec8c33578bc22d925b64fa02626fe75229ce58 Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Tue, 3 Mar 2015 22:35:46 +0000 Subject: [PATCH] multicpu1sec-c: opening the file r/w to truncate it --- plugins/system/multicpu1sec/multicpu1sec-c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/system/multicpu1sec/multicpu1sec-c.c b/plugins/system/multicpu1sec/multicpu1sec-c.c index e3c02956..5c99d831 100644 --- a/plugins/system/multicpu1sec/multicpu1sec-c.c +++ b/plugins/system/multicpu1sec/multicpu1sec-c.c @@ -126,7 +126,7 @@ int acquire() { int fetch() { printf("fetch()\n"); - FILE* cache_file = fopen(cache_filename, "r"); + FILE* cache_file = fopen(cache_filename, "r+"); /* cat the cache_file to stdout */ char buffer[1024];