Enlightenment CVS committal
Author : atmosphere
Project : misc
Module : elogin
Dir : misc/elogin/src/daemon
Modified Files:
spawner.c spawner.h
Log Message:
ok this should do it, functioning properly now =)
===================================================================
RCS file: /cvsroot/enlightenment/misc/elogin/src/daemon/spawner.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- spawner.c 18 Jan 2003 04:30:03 -0000 1.11
+++ spawner.c 18 Jan 2003 04:45:22 -0000 1.12
@@ -118,7 +118,7 @@
{
fork_and_exit();
}
-
+
/* Check to make sure elogin binary is executable */
if (access(ELOGIN, X_OK))
{
@@ -126,7 +126,7 @@
"Elogin: Fatal Error: Cannot execute elogin binary. Aborting.\n");
exit(1);
}
-
+
close(0);
close(1);
close(2);
@@ -223,16 +223,17 @@
/* check to see if X is still alive before restarting elogin */
if (!waitpid(d->pid.x, &x_status, WNOHANG))
{
- XSync(d->display, False);
- spawn_elogin();
+ kill(d->pid.x, SIGTERM);
+ sleep(1);
}
else
{
- kill(d->pid.x, SIGKILL);
+ /* Die Hard Like Bruce Willis */
+ kill(d->pid.x, SIGTERM);
d->display = NULL;
- spawn_x();
- spawn_elogin();
}
+ spawn_x();
+ spawn_elogin();
}
}
else if (pid == d->pid.x)
@@ -243,6 +244,8 @@
/* URM...don't try to XSync on a non-existent X process. SIGPIPE
here */
d->display = NULL;
+ /* Die Hard 2 */
+ kill(d->pid.x, SIGTERM);
}
if (d->status == LAUNCHING)
{
===================================================================
RCS file: /cvsroot/enlightenment/misc/elogin/src/daemon/spawner.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- spawner.h 18 Jan 2003 04:02:47 -0000 1.7
+++ spawner.h 18 Jan 2003 04:45:22 -0000 1.8
@@ -13,7 +13,7 @@
#define X_SERVER "/usr/X11R6/bin/X -terminate -ac -quiet"
/* #define X_SERVER "/usr/X11R6/bin/Xnest -terminate -geometry 640x480 -ac -full :1"
*/
-#define X_DISP ":0" /* only used if DISPLAY variable is NOT set */
+#define X_DISP ":0" /* only used if DISPLAY variable is NOT set */
#define ELOGIN PREFIX "/bin/elogin_wrapper"
#define PIDFILE "/var/run/elogind.pid"
-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your
clients even if they use browsers that are limited to 40 bit encryption.
Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs