Enlightenment CVS committal

Author  : jeoparde
Project : e17
Module  : apps/entrance

Dir     : e17/apps/entrance/src/daemon


Modified Files:
        spawner.c 


Log Message:
- Make spawner a little bit more robust: prevent SIGPIPE crashes if the
  X server is terminated in the middle of cleanup
- New Matrix theme added
- Login face size is ignored for now, will automatically resize to image


===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/daemon/spawner.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- spawner.c   7 Feb 2003 07:28:30 -0000       1.2
+++ spawner.c   28 Feb 2003 10:39:14 -0000      1.3
@@ -78,10 +78,19 @@
 x_server_killall(void)
 {
    int screens, i, j;
+   pid_t pid;
 
    if (!d || !(d->display))
       return;
 
+   /* Fork off to avoid bringing down the daemon if X server dies in
+       * the middle of this function */
+   if((pid = fork())) {
+          waitpid(pid, NULL, 0);
+          kill(pid, SIGKILL);
+          return;
+   }
+
    /* Don't want entranced barfing over a BadWindow error or sth */
    XSetErrorHandler(x_error_handler_ignore);
 
@@ -302,6 +311,7 @@
                       "Entranced: FATAL: Could not fork() entrance process\n");
               exit(1);
            }
+                  /* Process Monitor */
            if (pid)
            {
               /* Wait for client session process to die, then destroy this
@@ -399,6 +409,8 @@
 
       /* Die Harder! */
       kill(d->pid.x, SIGTERM);
+         sleep(3);
+         kill(d->pid.x, SIGKILL);
       d->display = NULL;
 
       /* Attend to any waiting zombies before proceeding */




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to