config: backup - handle correctly spawnv return code
This commit is contained in:
parent
dafea1a693
commit
3dba7bf3ac
1 changed files with 6 additions and 4 deletions
|
@ -1211,10 +1211,12 @@ dobackup(const char *oldver)
|
||||||
root, oldver);
|
root, oldver);
|
||||||
tvhinfo("config", "backup: running, output file %s", outfile);
|
tvhinfo("config", "backup: running, output file %s", outfile);
|
||||||
|
|
||||||
spawnv(argv[0], (void *)argv, NULL, 1, 1);
|
if (spawnv(argv[0], (void *)argv, NULL, 1, 1)) {
|
||||||
|
code = -ENOENT;
|
||||||
|
} else {
|
||||||
while ((code = spawn_reap(errtxt, sizeof(errtxt))) == -EAGAIN)
|
while ((code = spawn_reap(errtxt, sizeof(errtxt))) == -EAGAIN)
|
||||||
usleep(20000);
|
usleep(20000);
|
||||||
|
}
|
||||||
|
|
||||||
if (code) {
|
if (code) {
|
||||||
htsbuf_queue_t q;
|
htsbuf_queue_t q;
|
||||||
|
|
Loading…
Add table
Reference in a new issue