Commit abb0a31e authored by Daniel Black's avatar Daniel Black Committed by Anel

output_core_info - freebsd rlimits in different proc entry

parent 4197014b
...@@ -57,7 +57,11 @@ static inline void output_core_info() ...@@ -57,7 +57,11 @@ static inline void output_core_info()
my_safe_printf_stderr("Writing a core file...\nWorking directory at %.*s\n", my_safe_printf_stderr("Writing a core file...\nWorking directory at %.*s\n",
(int) len, buff); (int) len, buff);
} }
#ifdef __FreeBSD__
if ((fd= my_open("/proc/curproc/rlimit", O_RDONLY, MYF(0))) >= 0)
#else
if ((fd= my_open("/proc/self/limits", O_RDONLY, MYF(0))) >= 0) if ((fd= my_open("/proc/self/limits", O_RDONLY, MYF(0))) >= 0)
#endif
{ {
my_safe_printf_stderr("Resource Limits:\n"); my_safe_printf_stderr("Resource Limits:\n");
while ((len= my_read(fd, (uchar*)buff, sizeof(buff), MYF(0))) > 0) while ((len= my_read(fd, (uchar*)buff, sizeof(buff), MYF(0))) > 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment