Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9932

Modified Files:
        merovingian.mx 
Log Message:
Restore the patches to merovingian.mx.
The key ingredient is robustness against failing to find directories.
Binding it to the local dbfarm is encoded in several places.


U merovingian.mx
Index: merovingian.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian.mx,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- merovingian.mx      12 Oct 2008 15:12:42 -0000      1.61
+++ merovingian.mx      12 Oct 2008 15:43:31 -0000      1.62
@@ -1761,7 +1761,7 @@
        err e;
        int argp;
        str dbfarm, msglog, errlog, pidfilename;
-       str p, prefix, c;
+       str p, prefix;
        FILE *cnf = NULL, *pidfile = NULL;
        char buf[1024];
        char lockfile[512];
@@ -1935,14 +1935,7 @@
                return(1);
        }
 
-       /* the lock file is placed in the same directory as the pid */
-       /* which we know exists by now */
-       strcpy(lockfile, pidfilename);
-       c= strrchr(lockfile,'/');
-       if (c)
-               strcpy(c+1,".merovingian_lock");
-       else
-               strcpy(lockfile, ".merovingian_lock");
+       snprintf(lockfile, 512, "%s/.merovingian_lock", dbfarm);
        /* lock such that we are alone on this world */
        if ((ret = MT_lockf(lockfile, F_TLOCK, 4, 1)) == -1) {
                /* locking failed */
@@ -2094,12 +2087,7 @@
        SABAOTHinit(dbfarm, NULL);
 
        /* set up control channel path */
-       strcpy(buf, pidfilename);
-       c= strrchr(buf,'/');
-       if (c)
-               strcpy(c+1,".merovingian_control");
-       else
-               strcpy(buf, ".merovingian_control");
+       snprintf(buf, 1024, "%s/.merovingian_control", dbfarm);
        unlink(buf);
        GDKfree(dbfarm);
 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to