On Fri, 28 Dec 2012 05:12:57 +0900 Cedric BAIL <moa.blueb...@gmail.com> said:

> Cedric Bail
> On Dec 28, 2012 3:07 AM, "Enlightenment SVN" <no-re...@enlightenment.org>
> wrote:
> >
> > Log:
> > elev8: Removed daemonizing behaviour
> >
> >   Summary:
> >    - As init systems (like systemd) handle the daemonizing stuff, elev8
> >    doesn't need to worry about it.
> 
> This seems weird to me as an excuse. Elev8 as a daemon run in the user
> session and systemd is clearly not ready there. As I will use e infra to
> start it, I don't really care, but doesn't that impact other environment?

i have to agree. tying yourself to systemd to do something as basic as this is
a bad move.

1. systemd is rare, not common at the moment.
2. even if it becomes common there will be major os's (bsd's, windows?, ...
ubuntu) that will just say no to it no matter what, so we need an alternative
anyway.
3. in systemd land user session handling is new, shiny and last i knew not
ready yet, so even there it's a bad move.

it should be something like this:

"if systemd there/running and used as user session etc... THEN use it to
daemonize, else, use own code"...and decide at runtime on this, not
compile-time.

> >    Author:    ederson <eder...@profusion.mobi>
> >
> > Author:       mello
> > Date:         2012-12-27 10:07:18 -0800 (Thu, 27 Dec 2012)
> > New Revision: 81750
> > Trac:         http://trac.enlightenment.org/e/changeset/81750
> >
> > Modified:
> >   trunk/PROTO/elev8/src/bin/args.c trunk/PROTO/elev8/src/bin/args.h
> trunk/PROTO/elev8/src/bin/main.cc
> >
> > Modified: trunk/PROTO/elev8/src/bin/args.c
> > ===================================================================
> > --- trunk/PROTO/elev8/src/bin/args.c    2012-12-27 15:05:44 UTC (rev
> 81749)
> > +++ trunk/PROTO/elev8/src/bin/args.c    2012-12-27 18:07:18 UTC (rev
> 81750)
> > @@ -17,7 +17,6 @@
> >    {
> >      ECORE_GETOPT_STORE_DEF_BOOL(0, "debug", "enable debuggind mode",
> EINA_TRUE),
> >      ECORE_GETOPT_STORE_DEF_BOOL(0, "server", "enable server mode",
> EINA_TRUE),
> > -    ECORE_GETOPT_STORE_DEF_BOOL(0, "no-daemonize", "do not create a
> daemon on server mode", EINA_TRUE),
> >      ECORE_GETOPT_STORE_DEF_BOOL(0, "shutdown", "shutdown elev8 server.",
> EINA_TRUE),
> >      ECORE_GETOPT_STORE_DEF_BOOL(0, "connect", "run app spawing a elev8
> server.", EINA_TRUE),
> >      ECORE_GETOPT_HELP('h', "help"),
> > @@ -34,7 +33,6 @@
> >     Ecore_Getopt_Value values[] = {
> >       ECORE_GETOPT_VALUE_BOOL(args->debug),
> >       ECORE_GETOPT_VALUE_BOOL(args->server),
> > -     ECORE_GETOPT_VALUE_BOOL(args->no_daemonize),
> >       ECORE_GETOPT_VALUE_BOOL(args->shutdown),
> >       ECORE_GETOPT_VALUE_BOOL(args->connect),
> >       ECORE_GETOPT_VALUE_BOOL(args->quit),
> >
> > Modified: trunk/PROTO/elev8/src/bin/args.h
> > ===================================================================
> > --- trunk/PROTO/elev8/src/bin/args.h    2012-12-27 15:05:44 UTC (rev
> 81749)
> > +++ trunk/PROTO/elev8/src/bin/args.h    2012-12-27 18:07:18 UTC (rev
> 81750)
> > @@ -11,7 +11,6 @@
> >    typedef struct {
> >       Eina_Bool debug;
> >       Eina_Bool server;
> > -     Eina_Bool no_daemonize;
> >       Eina_Bool shutdown;
> >       Eina_Bool connect;
> >       Eina_Bool quit;
> >
> > Modified: trunk/PROTO/elev8/src/bin/main.cc
> > ===================================================================
> > --- trunk/PROTO/elev8/src/bin/main.cc   2012-12-27 15:05:44 UTC (rev
> 81749)
> > +++ trunk/PROTO/elev8/src/bin/main.cc   2012-12-27 18:07:18 UTC (rev
> 81750)
> > @@ -395,25 +395,6 @@
> >     return ECORE_CALLBACK_DONE;
> >  }
> >
> > -static void
> > -daemonize()
> > -{
> > -   int pID = fork();
> > -
> > -   if (pID < 0)
> > -     {
> > -        ERR("Couldn't create server daemon");
> > -        exit(1);
> > -     }
> > -
> > -   if (pID > 0)
> > -     exit(0); // Parent stops
> > -
> > -   // Child go on.
> > -   ecore_fork_reset();
> > -   setsid(); // Child creates a session for itself
> > -}
> > -
> >  void
> >  load_elev8_modules()
> >  {
> > @@ -491,11 +472,7 @@
> >     HandleScope handle_scope;
> >
> >     if (args.server)
> > -     {
> > -        if (!args.no_daemonize)
> > -          daemonize();
> > -        server_start();
> > -     }
> > +     server_start();
> >     else if (args.shutdown)
> >       server_shutdown();
> >     else if (args.connect)
> >
> >
> >
> ------------------------------------------------------------------------------
> > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> > MVPs and experts. ON SALE this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122712
> > _______________________________________________
> > enlightenment-svn mailing list
> > enlightenment-...@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> >
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to