]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afs.c
Handle sender commands in vss_post_select().
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index fd43d593d1f30c118df472ca3f11f2aa53b02864..bc42026e460ac7ba5f38f992ae17e1f18a3c5ce9 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -499,7 +499,7 @@ static int pass_afd(int fd, char *buf, size_t size)
  *
  * \sa open_and_update_audio_file().
  */
-int open_next_audio_file(void)
+static int open_next_audio_file(void)
 {
        struct osl_row *aft_row;
        struct audio_file_data afd;
@@ -757,8 +757,8 @@ static void signal_post_select(struct sched *s, struct task *t)
 {
        struct signal_task *st = container_of(t, struct signal_task, task);
        if (getppid() == 1) {
-               t->error = -E_AFS_PARENT_DIED;
-               return;
+               PARA_EMERG_LOG("para_server died\n");
+               goto shutdown;
        }
        if (!FD_ISSET(st->fd, &s->rfds))
                return;
@@ -771,6 +771,8 @@ static void signal_post_select(struct sched *s, struct task *t)
                init_admissible_files(current_mop);
                return;
        }
+       PARA_EMERG_LOG("terminating on signal %d\n", st->signum);
+shutdown:
        sched_shutdown();
        t->error = -E_AFS_SIGNAL;
 }