]> andersk Git - moira.git/commitdiff
Fix for update_quota (correlation names.)
authorgenoa <genoa>
Sun, 23 Aug 1992 21:37:02 +0000 (21:37 +0000)
committergenoa <genoa>
Sun, 23 Aug 1992 21:37:02 +0000 (21:37 +0000)
Fix for incremental updates so that stdout doesn't close.
(_exit() after execve().)

server/increment.dc

index 3e121fe3210091527e06876f3fe03db6520b28a1..a71430e633d846e38ca745008b13948823823bac 100644 (file)
@@ -13,6 +13,7 @@
 static char *rcsid_increment_dc = "$Header$";
 #endif lint
 
+#include <fcntl.h>
 #include <mit-copyright.h>
 #include <moira.h>
 #include "query.h"
@@ -171,10 +172,10 @@ char **argv;
        strcpy(barg0, "?");
        strcpy(barg1, argv[1]);
        strcpy(barg2, "?");
-       sprintf(buffer, "%s and fs.filsys_id = q.filsys_id", qual);
+       sprintf(buffer, "%s and filesys.filsys_id = quota.filsys_id", qual);
        qual = buffer;
-       EXEC SQL SELECT q.quota, fs.name INTO :barg3, :barg4
-         FROM quota q, filesys fs WHERE :qual;
+       EXEC SQL SELECT CHAR(quota.quota), filesys.name INTO :barg3, :barg4
+         FROM quota, filesys WHERE :qual;
        beforec = 5;
     } else if (!strcmp(table, "list")) {
        EXEC SQL SELECT name, CHAR(active), CHAR(publicflg), CHAR(hidden),
@@ -283,10 +284,10 @@ EXEC SQL END DECLARE SECTION;
        strcpy(aarg0, "?");
        strcpy(aarg1, argv[1]);
        strcpy(aarg2, "?");
-       sprintf(buffer, "%s and fs.filsys_id = q.filsys_id", qual);
+       sprintf(buffer, "%s and filesys.filsys_id = quota.filsys_id", qual);
        qual = buffer;
-       EXEC SQL SELECT CHAR(q.quota), fs.name INTO :aarg3, :aarg4
-         FROM quota q, filesys fs WHERE :qual;
+       EXEC SQL SELECT CHAR(quota.quota), filesys.name INTO :aarg3, :aarg4
+         FROM quota, filesys WHERE :qual;
        afterc = 5;
     } else if (!strcmp(table, "list")) {
        EXEC SQL SELECT name, CHAR(active), CHAR(publicflg), CHAR(hidden),
@@ -445,7 +446,7 @@ next_incremental()
     switch (inc_pid) {
     case 0:
        execv(prog, argv);
-       exit(1);
+       _exit(1);
     case -1:
        com_err(whoami, 0, "Failed to start incremental update");
        break;
This page took 0.031675 seconds and 5 git commands to generate.