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

Merger


diffs (51 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -560,14 +560,16 @@ yes-*-*)
        MCHECK_ADD_FLAG([-Wmissing-include-dirs])
        MCHECK_ADD_FLAG([-Wlogical-op])
 
-       dnl  With clang 2.8 (no other tested) and gcc < 4.5 (tested
+       dnl  With clang 2.8 & 3.3 (which reports as 4.2.1 with -dumpversion)
+       dnl (no other tested) and gcc < 4.5 (tested
        dnl  3.4.6, 4.2.1, 4.3.2, 4.4.4, 4.4.5, 4.5.1, 4.5.2),
        dnl  "-Wunreachable-code" triggers numerous "will never be
        dnl  executed" (at least) in our stream code, mostly (if
-       dnl  not all) false positives, though; thus, we do not use
+       dnl  not all) false positives, though, as well as in
+       dnl  YACC/BISON-generated code; thus, we do not use
        dnl  "-Wunreachable-code" with clang 2.8 and gcc < 4.5 .
        case "$CC-$gcc_ver" in
-       *clang*-2.8|*gcc*-[[0-3]].*|*gcc*-4.[[0-4]].*)
+       *clang*-2.8|*clang*-3.3|*clang*-4.2.1|*gcc*-[[0-3]].*|*gcc*-4.[[0-4]].*)
                ;;
        *)
                MCHECK_ADD_FLAG([-Wunreachable-code])
diff --git a/tools/merovingian/daemon/controlrunner.c 
b/tools/merovingian/daemon/controlrunner.c
--- a/tools/merovingian/daemon/controlrunner.c
+++ b/tools/merovingian/daemon/controlrunner.c
@@ -384,7 +384,23 @@ static void ctl_handle_client(
                                                        char *vaultkey;
 
                                                        /* the child, pollute 
scope by loading BBP */
-                                                       chdir(q);
+                                                       if (chdir(q) < 0) {
+                                                               /* Fabian says 
"Ignore the output.
+                                                                * The idea is 
that the stuff below
+                                                                * will also 
fail, and therefore emit
+                                                                * some error, 
but if that happens,
+                                                                * the world 
already is in such a bad
+                                                                * shape that 
that most likely isn't
+                                                                * your biggest 
problem.
+                                                                * Hence a 
(void) probably does.
+                                                                * If not, a 
fake if.
+                                                                * (exit(0) 
should be fine)."
+                                                                * 
(https://www.monetdb.org/pipermail/developers-list/2014-February/004238.html)
+                                                                */
+                                                               
Mfprintf(_mero_ctlerr, "%s: could not chdir to "
+                                                                       "'%s': 
%d: %s\n", origin, q, errno, strerror(errno));
+                                                               exit(0);
+                                                       }
 
                                                        buf2[0] = '\0';
                                                        if ((secretf = 
fopen(".vaultkey", "r")) != NULL) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to