/*
- * $Id: store_dir.cc,v 1.32 1997/10/23 20:47:53 wessels Exp $
+ * $Id: store_dir.cc,v 1.33 1997/10/25 16:49:06 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
safeunlink(path, 1);
if (mkdir(path, 0777) < 0) {
if (errno != EEXIST) {
- /* NOTE: couldn't figure size of tmp_error_buf, assumed
- * ERROR_BUF_SZ */
snprintf(tmp_error_buf, ERROR_BUF_SZ,
"Failed to create swap directory %s: %s",
path,
}
debug(47, 1) ("Created directory %s\n", path);
if (stat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) {
- /* NOTE: couldn't figure size of tmp_error_buf, assumed
- * ERROR_BUF_SZ */
snprintf(tmp_error_buf, ERROR_BUF_SZ,
"Failed to create directory %s: %s", path, xstrerror());
fatal(tmp_error_buf);
/*
- * $Id: tools.cc,v 1.124 1997/10/21 03:12:07 wessels Exp $
+ * $Id: tools.cc,v 1.125 1997/10/25 16:49:06 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
if (rl.rlim_cur > rl.rlim_max)
Squid_MaxFD = rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
- /* NOTE: couldn't figure size of tmp_error_buf, thus
- * assuming ERROR_BUF_SZ */
snprintf(tmp_error_buf, ERROR_BUF_SZ,
"setrlimit: RLIMIT_NOFILE: %s", xstrerror());
fatal_dump(tmp_error_buf);
if (rl.rlim_cur > rl.rlim_max)
Squid_MaxFD = rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
- /* NOTE: couldn't figure size of tmp_error_buf, thus
- * assuming ERROR_BUF_SZ */
snprintf(tmp_error_buf, ERROR_BUF_SZ,
"setrlimit: RLIMIT_OFILE: %s", xstrerror());
fatal_dump(tmp_error_buf);
} else if (rl.rlim_max > rl.rlim_cur) {
rl.rlim_cur = rl.rlim_max; /* set it to the max */
if (setrlimit(RLIMIT_DATA, &rl) < 0) {
- /* NOTE: couldn't figure size of tmp_error_buf, thus d
- * assuming ERROR_BUF_SZ */
snprintf(tmp_error_buf, ERROR_BUF_SZ,
"setrlimit: RLIMIT_DATA: %s", xstrerror());
fatal_dump(tmp_error_buf);
} else if (rl.rlim_max > rl.rlim_cur) {
rl.rlim_cur = rl.rlim_max; /* set it to the max */
if (setrlimit(RLIMIT_VMEM, &rl) < 0) {
- /* NOTE: couldn't figure size of tmp_error_buf, thus
- * assuming ERROR_BUF_SZ */
snprintf(tmp_error_buf, ERROR_BUF_SZ,
"setrlimit: RLIMIT_VMEM: %s", xstrerror());
fatal_dump(tmp_error_buf);