From: Jaroslav Kysela Date: Sat, 17 Jan 2015 21:26:51 +0000 (+0100) Subject: config: backup - handle correctly spawnv return code X-Git-Tag: v4.1~464 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3dba7bf3ac8ea48e6d8b5df6b7f28f1a96c9e6ab;p=thirdparty%2Ftvheadend.git config: backup - handle correctly spawnv return code --- diff --git a/src/config.c b/src/config.c index 4bb65fd49..890e212f3 100644 --- a/src/config.c +++ b/src/config.c @@ -1211,10 +1211,12 @@ dobackup(const char *oldver) root, oldver); tvhinfo("config", "backup: running, output file %s", outfile); - spawnv(argv[0], (void *)argv, NULL, 1, 1); - - while ((code = spawn_reap(errtxt, sizeof(errtxt))) == -EAGAIN) - usleep(20000); + if (spawnv(argv[0], (void *)argv, NULL, 1, 1)) { + code = -ENOENT; + } else { + while ((code = spawn_reap(errtxt, sizeof(errtxt))) == -EAGAIN) + usleep(20000); + } if (code) { htsbuf_queue_t q;