projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Log max/cur files using getrlimit
[yazpp-moved-to-github.git]
/
src
/
yaz-proxy-main.cpp
diff --git
a/src/yaz-proxy-main.cpp
b/src/yaz-proxy-main.cpp
index
03c0f61
..
8c7c32e
100644
(file)
--- a/
src/yaz-proxy-main.cpp
+++ b/
src/yaz-proxy-main.cpp
@@
-2,7
+2,7
@@
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy-main.cpp,v 1.32 2004-02-10 15:02:19 adam Exp $
+ * $Id: yaz-proxy-main.cpp,v 1.33 2004-02-12 17:17:31 adam Exp $
*/
#include <signal.h>
*/
#include <signal.h>
@@
-11,6
+11,11
@@
#include <sys/types.h>
#include <stdarg.h>
#include <sys/types.h>
#include <stdarg.h>
+#if HAVE_GETRLIMIT
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+
#include <yaz/log.h>
#include <yaz/options.h>
#include <yaz/log.h>
#include <yaz/options.h>
@@
-182,7
+187,6
@@
static void child_run(Yaz_SocketManager *m, int run)
chown(log_file, pw->pw_uid, pw->pw_gid);
xfree(log_file);
}
chown(log_file, pw->pw_uid, pw->pw_gid);
xfree(log_file);
}
-
if (setuid(pw->pw_uid) < 0)
{
yaz_log(LOG_FATAL|LOG_ERRNO, "setuid");
if (setuid(pw->pw_uid) < 0)
{
yaz_log(LOG_FATAL|LOG_ERRNO, "setuid");
@@
-190,6
+194,12
@@
static void child_run(Yaz_SocketManager *m, int run)
}
xfree(uid);
}
}
xfree(uid);
}
+#if HAVE_GETRLIMIT
+ struct rlimit limit_data;
+ getrlimit(RLIMIT_NOFILE, &limit_data);
+ yaz_log(LOG_LOG, "0 get limit NOFILE cur=%d max=%d",
+ limit_data.rlim_cur, limit_data.rlim_max);
+#endif
while (m->processEvent() > 0)
;
while (m->processEvent() > 0)
;