Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_start_main.c 


Log Message:


flush stdou before forking - removes multiple printfs in buffer still being
flushed

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_start_main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_start_main.c      14 Dec 2006 19:26:29 -0000      1.12
+++ e_start_main.c      28 Apr 2007 05:03:04 -0000      1.13
@@ -264,16 +264,14 @@
    int l, fd, children = 0, cret;
    
    home = getenv("HOME");
-   if (home)
-     snprintf(buf, sizeof(buf), "%s/.e-precache", home);
-   else
-     snprintf(buf, sizeof(buf), "/tmp/.e-precache");
+   if (home) snprintf(buf, sizeof(buf), "%s/.e-precache", home);
+   else snprintf(buf, sizeof(buf), "/tmp/.e-precache");
    f = fopen(buf, "r");
    if (!f) return;
    unlink(buf);
    if (fork()) return;
-   while (fgets(buf, sizeof(buf), f));
-   rewind(f);
+//   while (fgets(buf, sizeof(buf), f));
+//   rewind(f);
    while (fgets(buf, sizeof(buf), f))
      {
        l = strlen(buf);
@@ -360,7 +358,8 @@
             exit(0);
          }
      }
-   while (do_precache)
+   printf("E - PID=%i, do_precache=%i\n", getpid(), do_precache);
+   if (do_precache)
      {
        void *lib, *func;
        
@@ -368,27 +367,27 @@
        /* sanity checks - if precache might fail - check here first */
        lib = dlopen("libevas.so", RTLD_GLOBAL | RTLD_LAZY);
        if (!lib) dlopen("libevas.so.1", RTLD_GLOBAL | RTLD_LAZY);
-       if (!lib) break;
+       if (!lib) goto done;
        func = dlsym(lib, "evas_init");
-       if (!func) break;
+       if (!func) goto done;
        lib = dlopen("libecore_file.so", RTLD_GLOBAL | RTLD_LAZY);
        if (!lib) dlopen("libecore_file.so.1", RTLD_GLOBAL | RTLD_LAZY);
-       if (!lib) break;
+       if (!lib) goto done;
        func = dlsym(lib, "ecore_file_init");
-       if (!func) break;
+       if (!func) goto done;
        lib = dlopen("libeet.so", RTLD_GLOBAL | RTLD_LAZY);
        if (!lib) dlopen("libeet.so.0", RTLD_GLOBAL | RTLD_LAZY);
-       if (!lib) break;
+       if (!lib) goto done;
        func = dlsym(lib, "eet_init");
-       if (!func) break;
+       if (!func) goto done;
        /* precache SHOULD work */
-       printf("E PRECACHE ENABLED\n");
        snprintf(buf, sizeof(buf), 
"%s/lib/enlightenment/preload/e_precache.so", _prefix_path);
        env_set("LD_PRELOAD", buf);
+       printf("E - PRECACHE GOING NOW...\n");
+       fflush(stdout);
        precache();
-       do_precache = 0;
-       break;
      }
+   done:
    
    args = alloca((argc + 1) * sizeof(char *));
    args[0] = "enlightenment";



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to