Enlightenment CVS wrote:
> Enlightenment CVS committal
>
> Author  : raster
> Project : e17
> Module  : apps/entrance
>
> Dir     : e17/apps/entrance/src/client
>
>
> Modified Files:
>       entrance_login.c entrance_session.c 
>
>
> Log Message:
>
>
> moe loging - and ACTUALLY work. executing entrance_login via bin/sh loses
> child process info etc thus waitpit() will never wait for the x session. exe
> directly ith no shell in between - and now its all happy.
>   
ahh... i c.

Makes sense, I didn't even think of that, and that has been there for 
quite a while... funky bug.

I'm going to device an elaborate plan to steal that UNIX programming 
book that devilhorns has been reading lately... I need it seriously, so 
i can be as bad-ass as our own raster :)
> <snip>

>     }
> +/* no need to free - we are goign to exec ourselves and be replaced   
>     struct_passwd_free(pwent);
>     entrance_session_free(e);
>     if (shell) free(shell);
>     if (user) free(user);
> + */
>   
oops... you're right there.
>     /* 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);
> +   /* this causes entreance to reset - bad bad bad */
> +   snprintf(pids, sizeof(pids), "%i", (int)pid);
> +   snprintf(buf, sizeof(buf), "%s/%s/entrance_login", PACKAGE_LIB_DIR, 
> PACKAGE);
> +#ifdef HAVE_PAM
> +   if (e->config->auth == ENTRANCE_USE_PAM)
> +     {
> +     syslog(LOG_NOTICE, "Exec entrance login replacement: %s %s %s %s", buf, 
> pids, pwent->pw_name, e->display);
> +     execl(buf, buf, pids, pwent->pw_name, e->display, NULL);
> +     }
> +   else
> +#endif
> +     {
> +     syslog(LOG_NOTICE, "Exec entrance login replacement: %s %s", buf, pids);
> +     execl(buf, buf, pids, NULL);
> +     }
> +   pause();
>     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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to