p/multicpu1sec-c: fix stackoverflow in acquire()

When acquire() cannot open/create the cache file, it wrongly called
itself.

A fatal error is now thrown instead
This commit is contained in:
Steve Schnepp 2018-04-16 19:54:51 +02:00
parent 0a40358f9e
commit a720b6c9dc
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ int acquire() {
/* open the spoolfile */
FILE* cache_file = fopen(cache_filename, "a");
if (!cache_file) {
return acquire();
return fail("cannot create cache_file");
}
int cache_file_fd = fileno(cache_file);