From: Bluezery <ohpowel@gmail.com>
[framework/uifw/elementary.git] / src / bin / quicklaunch.c
index 59384c7..c9e6de9 100644 (file)
@@ -1,4 +1,7 @@
 #include <Elementary.h>
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -38,7 +41,7 @@ static int _log_dom = -1;
 #define DBG(...) EINA_LOG_DOM_DBG(_log_dom, __VA_ARGS__)
 
 static void
-post_fork(void *data)
+post_fork(void *data __UNUSED__)
 {
    sigaction(SIGINT, &old_sigint, NULL);
    sigaction(SIGTERM, &old_sigterm, NULL);
@@ -61,16 +64,14 @@ post_fork(void *data)
 }
 
 static void
-child_handler(int x, siginfo_t *info, void *data)
+child_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
 {
    int status;
-   pid_t pid;
-
-   while ((pid = waitpid(-1, &status, WNOHANG)) > 0);
+   while (waitpid(-1, &status, WNOHANG) > 0);
 }
 
 static void
-crash_handler(int x, siginfo_t *info, void *data)
+crash_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
 {
    double t;
 
@@ -88,16 +89,16 @@ static void
 handle_run(int fd, unsigned long bytes)
 {
    unsigned char *buf = NULL;
-   int i, num;
+   int i;
    char **argv = NULL;
    char *cwd;
    int argc;
 
    buf = alloca(bytes);
-   if ((num = read(fd, buf, bytes)) < 0)
+   if (read(fd, buf, bytes) <= 0)
      {
-       close(fd);
-       return;
+        close(fd);
+        return;
      }
    close(fd);
    argc = ((unsigned long *)(buf))[0];
@@ -265,10 +266,11 @@ main(int argc, char **argv)
        struct sockaddr_un client;
        socklen_t len;
 
-       elm_quicklaunch_sub_init(argc, argv);
-       elm_quicklaunch_seed();
        len = sizeof(struct sockaddr_un);
        fd = accept(sock, (struct sockaddr *)&client, &len);
+       elm_quicklaunch_sub_init(argc, argv);
+// don't seed since we are doing this AFTER launch request        
+//     elm_quicklaunch_seed();
        if (fd >= 0)
          {
             unsigned long bytes;