Enlightenment CVS committal
Author : essiene
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/client
Modified Files:
entrance_session.c
Log Message:
Fix bloat issue noticed by Raster this morning. We're back to normal mem usage.
I've just learnt a practical lesson on patch review... I actually should have
caught this earlier.
===================================================================
RCS file: /cvs/e/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- entrance_session.c 31 Aug 2006 14:37:37 -0000 1.86
+++ entrance_session.c 26 Sep 2006 18:50:29 -0000 1.87
@@ -479,15 +479,38 @@
exit(0);
default:
syslog(LOG_NOTICE, "Replacing Entrance with simple login program to
wait for session end.");
- wait(NULL);
+#ifdef HAVE_PAM
+ if (e->config->auth == ENTRANCE_USE_PAM)
+ {
+ snprintf(buf, sizeof(buf), "%s/%s/entrance_login %i %s %s",
+ PACKAGE_LIB_DIR, PACKAGE, (int) pid, pwent->pw_name,
+ e->display);
+ }
+ else
+#endif
+ {
+ snprintf(buf, sizeof(buf), "%s/%s/entrance_login %i",
+ PACKAGE_LIB_DIR, PACKAGE, (int) pid);
+ }
+ shell = strdup("/bin/sh");
+ /* this bypasses a race condition where entrance loses its x
+ connection before the wm gets it and x goes and resets itself */
+ sleep(10);
+ /*
+ * FIXME These should be called!
ecore_x_shutdown();
ecore_shutdown();
+ */
break;
}
struct_passwd_free(pwent);
entrance_session_free(e);
if (shell) free(shell);
if (user) free(user);
+ /* replace this process with a clean small one that just waits for its */
+ /* child to exit.. passed on the cmd-line */
+
+ execl("/bin/sh", "/bin/sh", "-l", "-c", buf, NULL);
if (buf) free(buf);
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs