]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - fade.c
Change year in Copyright comment from 2007 to 2008.
[paraslash.git] / fade.c
diff --git a/fade.c b/fade.c
index faf9b59a3911abffa160c87097e9b813124e281d..95fcba2cf79d5e85422328bda03a23916afd1fa3 100644 (file)
--- a/fade.c
+++ b/fade.c
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (C) 1998-2007 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1998-2008 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -149,7 +149,7 @@ out:
        close(mixer_fd);
 }
 
        close(mixer_fd);
 }
 
-static int client_cmd(const char *cmd,...)
+static void client_cmd(const char *cmd)
 {
        int ret, fds[3] = {0, 0, 0};
        pid_t pid;
 {
        int ret, fds[3] = {0, 0, 0};
        pid_t pid;
@@ -158,7 +158,11 @@ static int client_cmd(const char *cmd,...)
        PARA_INFO_LOG("%s\n", cmdline);
        ret = para_exec_cmdline_pid(&pid, cmdline, fds);
        free(cmdline);
        PARA_INFO_LOG("%s\n", cmdline);
        ret = para_exec_cmdline_pid(&pid, cmdline, fds);
        free(cmdline);
-       return ret;
+       if (ret < 0)
+               exit(EXIT_FAILURE);
+       do
+               ret = wait(NULL);
+       while (ret != -1 && errno != ECHILD);
 }
 
 static void change_afs_mode_and_play(char *afs_mode)
 }
 
 static void change_afs_mode_and_play(char *afs_mode)
@@ -205,7 +209,7 @@ static void sweet_dreams(void)
                tm->tm_min = min;
                tm->tm_sec = 0;
        } else {
                tm->tm_min = min;
                tm->tm_sec = 0;
        } else {
-               t1 += 8 * 60 * 60;
+               t1 += 9 * 60 * 60; /* nine hours from now */
                PARA_INFO_LOG("default wake time: %lu\n", t1);
                tm = localtime(&t1);
        }
                PARA_INFO_LOG("default wake time: %lu\n", t1);
                tm = localtime(&t1);
        }