and moving messages.
* setup.c: system-default message expire policy of "number of
messages, 150" is now a default configuration instead of a temp hack
+ * proxy.c: cache dir create now dies on any error except EEXIST
Wed Oct 14 22:41:16 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Misc code cleanup
char buf[256];
int pid;
- /* Create the cache directory. Ignore any error return, 'cuz that
- * just means it's already there. FIX... this really should check
- * for that particular error.
+ /* Create the cache directory. Die on any error *except* EEXIST
+ * because it's perfectly ok if the cache already exists.
*/
- mkdir(CACHE_DIR, 0700);
+ if (mkdir(CACHE_DIR, 0700)!=0) {
+ if (errno != EEXIST) {
+ printf("%d Error creating cache directory: %s\n",
+ ERROR+INTERNAL_ERROR,
+ strerror(errno));
+ exit(errno);
+ }
+ }
/* Now go there */
if (chdir(CACHE_DIR) != 0) exit(errno);