Changeset 2868 for trunk/src/kWorker/kWorker.c
- Timestamp:
- Sep 4, 2016, 3:28:12 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kWorker/kWorker.c
r2867 r2868 4716 4716 4717 4717 /* 4718 * Invalidate the missing cache entries. 4718 * Invalidate the volatile parts of cache (kBuild output directory, 4719 * temporary directory, whatever). 4719 4720 */ 4720 kFsCacheInvalidate Missing(g_pFsCache);4721 kFsCacheInvalidateCustomBoth(g_pFsCache); 4721 4722 return 0; 4722 4723 } … … 5234 5235 int main(int argc, char **argv) 5235 5236 { 5236 KSIZE cbMsgBuf = 0; 5237 KU8 *pbMsgBuf = NULL; 5238 int i; 5239 HANDLE hPipe = INVALID_HANDLE_VALUE; 5237 KSIZE cbMsgBuf = 0; 5238 KU8 *pbMsgBuf = NULL; 5239 int i; 5240 HANDLE hPipe = INVALID_HANDLE_VALUE; 5241 const char *pszTmp; 5242 KFSLOOKUPERROR enmIgnored; 5240 5243 5241 5244 /* 5242 * Create the cache .5245 * Create the cache and mark the temporary directory as using the custom revision. 5243 5246 */ 5244 5247 g_pFsCache = kFsCacheCreate(KFSCACHE_F_MISSING_OBJECTS | KFSCACHE_F_MISSING_PATHS); 5245 5248 if (!g_pFsCache) 5246 5249 return kwErrPrintfRc(3, "kFsCacheCreate failed!\n"); 5250 5251 pszTmp = getenv("TEMP"); 5252 if (pszTmp && *pszTmp != '\0') 5253 kFsCacheSetupCustomRevisionForTree(g_pFsCache, kFsCacheLookupA(g_pFsCache, pszTmp, &enmIgnored)); 5254 pszTmp = getenv("TMP"); 5255 if (pszTmp && *pszTmp != '\0') 5256 kFsCacheSetupCustomRevisionForTree(g_pFsCache, kFsCacheLookupA(g_pFsCache, pszTmp, &enmIgnored)); 5257 pszTmp = getenv("TMPDIR"); 5258 if (pszTmp && *pszTmp != '\0') 5259 kFsCacheSetupCustomRevisionForTree(g_pFsCache, kFsCacheLookupA(g_pFsCache, pszTmp, &enmIgnored)); 5247 5260 5248 5261 /* … … 5271 5284 return kwErrPrintfRc(2, "--pipe takes an argument!\n"); 5272 5285 } 5286 else if (strcmp(argv[i], "--volatile") == 0) 5287 { 5288 i++; 5289 if (i < argc) 5290 kFsCacheSetupCustomRevisionForTree(g_pFsCache, kFsCacheLookupA(g_pFsCache, argv[i], &enmIgnored)); 5291 else 5292 return kwErrPrintfRc(2, "--volatile takes an argument!\n"); 5293 } 5273 5294 else if (strcmp(argv[i], "--test") == 0) 5274 5295 return kwTestRun(argc - i - 1, &argv[i + 1]); … … 5277 5298 || strcmp(argv[i], "-?") == 0) 5278 5299 { 5279 printf("usage: kWorker --pipe <pipe-handle>\n"5300 printf("usage: kWorker [--volatile dir] --pipe <pipe-handle>\n" 5280 5301 "usage: kWorker <--help|-h>\n" 5281 5302 "usage: kWorker <--version|-V>\n" 5282 "usage: kWorker --test [<times> [--chdir <dir>]] -- args\n"5303 "usage: kWorker [--volatile dir] --test [<times> [--chdir <dir>]] -- args\n" 5283 5304 "\n" 5284 5305 "This is an internal kmk program that is used via the builtin_kSubmit.\n");
Note:
See TracChangeset
for help on using the changeset viewer.