Changeset: 19e36be3446b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19e36be3446b
Modified Files:
        tools/merovingian/daemon/forkmserver.c
Branch: default
Log Message:

merovingian: pass gdk_dbfarm onto started mservers

now that we do no longer use the monetdb5.conf file, make sure the
started mservers know where they should be doing their stuff (e.g. the
same place merovingian expects them to do it).


diffs (41 lines):

diff --git a/tools/merovingian/daemon/forkmserver.c 
b/tools/merovingian/daemon/forkmserver.c
--- a/tools/merovingian/daemon/forkmserver.c
+++ b/tools/merovingian/daemon/forkmserver.c
@@ -164,6 +164,8 @@
 
        pid = fork();
        if (pid == 0) {
+               char *sabdbfarm;
+               char *dbfarm = alloca(sizeof(char) * 1024);
                char *dbname = alloca(sizeof(char) * 512);
                char *port = alloca(sizeof(char) * 24);
                char *muri = alloca(sizeof(char) * 512); /* possibly undersized 
*/
@@ -174,11 +176,13 @@
                char *slave = NULL;
                char *pipeline = NULL;
                char *readonly = NULL;
-               char *argv[26]; /* for the exec arguments */
+               char *argv[28]; /* for the exec arguments */
                confkeyval *ckv, *kv;
                int c = 0;
                unsigned int mport;
 
+               msab_getDBfarm(&sabdbfarm);
+
                ckv = getDefaultProps();
                readProps(ckv, (*stats)->path);
 
@@ -236,11 +240,13 @@
                mport = (unsigned int)getConfNum(_mero_props, "port");
 
                /* ok, now exec that mserver we want */
+               snprintf(dbfarm, 1024, "gdk_dbfarm=%s", sabdbfarm);
                snprintf(dbname, 512, "--dbname=%s", database);
                snprintf(vaultkey, 512, "monet_vault_key=%s/.vaultkey", 
(*stats)->path);
                snprintf(muri, 512, "merovingian_uri=mapi:monetdb://%s:%hu/%s",
                                _mero_hostname, mport, database);
                argv[c++] = _mero_mserver;
+               argv[c++] = "--set"; argv[c++] = dbfarm;
                argv[c++] = dbname;
                argv[c++] = "--set"; argv[c++] = muri;
                if (mydoproxy == 1) {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to