From: genoa Date: Sun, 23 Aug 1992 21:37:02 +0000 (+0000) Subject: Fix for update_quota (correlation names.) X-Git-Tag: release77~433 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/af0171d95eaa6d46e39080385bdb6c9fb7d0bfde Fix for update_quota (correlation names.) Fix for incremental updates so that stdout doesn't close. (_exit() after execve().) --- diff --git a/server/increment.dc b/server/increment.dc index 3e121fe3..a71430e6 100644 --- a/server/increment.dc +++ b/server/increment.dc @@ -13,6 +13,7 @@ static char *rcsid_increment_dc = "$Header$"; #endif lint +#include #include #include #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;