On Mon, 21 May 2012 10:53:02 +0200 Vincent Torri <[email protected]> said:

it already doesn't work on windows. it's not gotten any worse. :) it's a
feature that is in the middle of being made - it's pretty much unix (even
linux) specific as it relies on shm_open totally and unix socket ipc right now
and later may rely on mprotect and madvise too. all of this needs virtualizing
out into os specifics, but that can wait a bit until it's fleshed out more. as
i noted it even doesnt work out of the box in linux properly.

> this will not work on windows (even compilation will fail)
> 
> Vincent
> 
> On Mon, May 21, 2012 at 10:44 AM, Enlightenment SVN
> <[email protected]> wrote:
> > Log:
> > let's make server work out of the box if u set:
> >
> >   export EVAS_CSERVE2=1
> >
> >  (and run cserve2)
> >
> >
> >
> > Author:       raster
> > Date:         2012-05-21 01:44:55 -0700 (Mon, 21 May 2012)
> > New Revision: 71274
> > Trac:         http://trac.enlightenment.org/e/changeset/71274
> >
> > Modified:
> >  trunk/evas/src/bin/evas_cserve2_client.c
> > trunk/evas/src/bin/evas_cserve2_main_loop_linux.c
> > trunk/evas/src/lib/cserve2/evas_cs2_client.c
> >
> > Modified: trunk/evas/src/bin/evas_cserve2_client.c
> > ===================================================================
> > --- trunk/evas/src/bin/evas_cserve2_client.c    2012-05-21 08:24:02 UTC
> > (rev 71273) +++ trunk/evas/src/bin/evas_cserve2_client.c    2012-05-21
> > 08:44:55 UTC (rev 71274) @@ -14,6 +14,11 @@
> >  static const char *SOCK_PATH = "/tmp/cserve2.socket";
> >  static unsigned int _rid_count = 0;
> >
> > +static struct sockaddr_un socket_local;
> > +#ifndef UNIX_PATH_MAX
> > +#define UNIX_PATH_MAX sizeof(socket_local.sun_path)
> > +#endif
> > +
> >  static void
> >  debug_msg(const void *buf, int size)
> >  {
> > @@ -323,7 +328,7 @@
> >  {
> >    int s, t, len, skip_cmd = 0;
> >    struct sockaddr_un remote;
> > -   char msgbuf[4096];
> > +   char msgbuf[4096], buf[UNIX_PATH_MAX], *env;
> >
> >    if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
> >      {
> > @@ -334,7 +339,14 @@
> >    printf("Trying to connect...\n");
> >
> >    remote.sun_family = AF_UNIX;
> > -   strcpy(remote.sun_path, SOCK_PATH);
> > +   env = getenv("EVAS_CSERVE2_SOCKET");
> > +   if (!env)
> > +     {
> > +        snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket",
> > +                 (int)getuid());
> > +        env = buf;
> > +     }
> > +   strncpy(remote.sun_path, env, UNIX_PATH_MAX - 1);
> >    len = strlen(remote.sun_path) + sizeof(remote.sun_family);
> >    if (connect(s, (struct sockaddr *)&remote, len) == -1)
> >      {
> >
> > Modified: trunk/evas/src/bin/evas_cserve2_main_loop_linux.c
> > ===================================================================
> > --- trunk/evas/src/bin/evas_cserve2_main_loop_linux.c   2012-05-21 08:24:02
> > UTC (rev 71273) +++ trunk/evas/src/bin/evas_cserve2_main_loop_linux.c
> > 2012-05-21 08:44:55 UTC (rev 71274) @@ -207,6 +207,11 @@
> >         return;
> >      }
> >
> > +   snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid
> > ());
> > +   /* FIXME: check we can actually create this socket */
> > +   strcpy(path, buf);
> > +   return;
> > +#if 0
> >    env = getenv("XDG_RUNTIME_DIR");
> >    if (!env || !env[0])
> >      {
> > @@ -222,6 +227,7 @@
> >    snprintf(buf, sizeof(buf), "%s/evas-cserve2-%x.socket", env, getuid());
> >    /* FIXME: check we can actually create this socket */
> >    strcpy(path, buf);
> > +#endif
> >  }
> >
> >  static int
> >
> > Modified: trunk/evas/src/lib/cserve2/evas_cs2_client.c
> > ===================================================================
> > --- trunk/evas/src/lib/cserve2/evas_cs2_client.c        2012-05-21 08:24:02
> > UTC (rev 71273) +++ trunk/evas/src/lib/cserve2/evas_cs2_client.c
> >  2012-05-21 08:44:55 UTC (rev 71274) @@ -58,6 +58,10 @@
> >         return;
> >      }
> >
> > +   snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid
> > ());
> > +   /* FIXME: check we can actually create this socket */
> > +   strcpy(path, buf);
> > +#if 0
> >    env = getenv("XDG_RUNTIME_DIR");
> >    if (!env || !env[0])
> >      {
> > @@ -73,6 +77,7 @@
> >    snprintf(buf, sizeof(buf), "%s/evas-cserve2-%x.socket", env, getuid());
> >    /* FIXME: check we can actually create this socket */
> >    strcpy(path, buf);
> > +#endif
> >  }
> >
> >  static Eina_Bool
> >
> >
> > ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > enlightenment-svn mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to