Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/client
Modified Files:
Makefile.am entrance_session.c
Added Files:
entrance_login.c
Log Message:
entrance race condition fix... i keep having to fix this.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- Makefile.am 21 Oct 2003 10:19:10 -0000 1.5
+++ Makefile.am 3 Jan 2004 04:54:57 -0000 1.6
@@ -3,7 +3,7 @@
INCLUDES = @edje_cflags@ @ecore_cflags@ @edb_cflags@ @evas_cflags@ \
@esmart_cflags@
-bin_PROGRAMS = entrance
+bin_PROGRAMS = entrance entrance_login
entrance_SOURCES = \
entrance_auth.c entrance_auth.h \
@@ -14,4 +14,8 @@
main.c
entrance_LDADD = @edje_libs@ @ecore_libs@ @edb_libs@ @evas_libs@ \
[EMAIL PROTECTED]@
+
+entrance_login_SOURCES = entrance_login.c
+entrance_login_LDADD = @edje_libs@ @ecore_libs@ @edb_libs@ @evas_libs@ \
@esmart_libs@
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- entrance_session.c 2 Jan 2004 22:36:05 -0000 1.28
+++ entrance_session.c 3 Jan 2004 04:54:57 -0000 1.29
@@ -263,7 +263,6 @@
ecore_evas_free(e->ee);
ecore_evas_shutdown();
e->ee = NULL;
-
ecore_x_sync();
syslog(LOG_NOTICE, "Starting session for user \"%s\".", e->auth->user);
@@ -303,11 +302,13 @@
}
/* clear users's password out of memory */
entrance_auth_clear_pass(e->auth);
- if (waitpid(pid, NULL, 0) == pid)
- {
- entrance_auth_session_end(e->auth);
- syslog(LOG_CRIT, "User Xsession Ended");
- }
+ /* this bypasses a race condition where entrance loses its x connection */
+ /* before the wm gets it and x goes and resets itself */
+ sleep(10);
+ /* replace this rpcoess with a clean small one that just waits for its */
+ /* child to exit.. passed on the cmd-line */
+ snprintf(buf, sizeof(buf), "%s/entrance_login %i", PACKAGE_BIN_DIR, (int)pid);
+ execl("/bin/sh", "/bin/sh", "-c", buf, NULL);
}
static void
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs