X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=gui.c;h=5d1a1b62596e6fa545579e760dedbac81f6be59a;hb=6b291ea777418071bb21c20aa7804447d95422bc;hp=92b7f7cfa0a7826ab5ca95ded4d4a8ca340f46d9;hpb=8aa9d0cddfefb882cfd8e7cadbeea5cce31b731f;p=paraslash.git diff --git a/gui.c b/gui.c index 92b7f7cf..5d1a1b62 100644 --- a/gui.c +++ b/gui.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998-2014 Andre Noll + * Copyright (C) 1998 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -659,7 +659,8 @@ static int status_post_select(struct sched *s, void *context) ret2 = for_each_stat_item(st->buf, st->loaded, update_item); if (ret < 0 || ret2 < 0) { st->loaded = 0; - PARA_NOTICE_LOG("closing stat pipe: %s\n", para_strerror(-ret)); + PARA_NOTICE_LOG("closing stat pipe: %s\n", + para_strerror(ret < 0? -ret : -ret2)); close(st->fd); st->fd = -1; clear_all_items(); @@ -1407,6 +1408,7 @@ __noreturn static void print_help_and_die(void) static int setup_tasks_and_schedule(void) { + int ret; struct exec_task exec_task = {.task = NULL}; struct status_task status_task = {.fd = -1}; struct input_task input_task = {.task = NULL}; @@ -1450,7 +1452,9 @@ static int setup_tasks_and_schedule(void) .post_select = signal_post_select, .context = &signal_task, }, &sched); - return schedule(&sched); + ret = schedule(&sched); + sched_shutdown(&sched); + return ret; } /**