From e6e681a43ac6aa9aaf977f71614793adea5b9c0f Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sat, 5 Jan 2013 02:21:27 +0000 Subject: [PATCH] wait for raw database if necessary --- main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 636d836..cfb3b75 100644 --- a/main.c +++ b/main.c @@ -858,11 +858,8 @@ nextopt: { struct stat st; - if (stat(epgpath, &st) == -1) - { - perror("stat"); - return 1; - } + while (stat(epgpath, &st) == -1) + sleep(30); printf("epgd: DB time %ld, last %ld\n", st.st_mtime, last);