Mailinglist Archive: opensuse (1151 mails)

< Previous Next >
Re: [opensuse] leap422 - where is my core dump?
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Fri, 02 Dec 2016 17:02:34 +0100
  • Message-id: <o1s5uq$eri$1@saturn.local.net>
david allan finch wrote:

If you are a developer add the following in you code and it will
override the system built it stuff. The core file will be in the
directory you are run the process, just like it used to. You might
want to have some form of flag say -core to enable it.

Hi David

fyi, the core file still ends up in /var/lib/systemd/coredump.
setrlimit isn't able to change the location, afaict.


/Per

----8<----
void my_allow_coredumps()
{
#if defined(__SVR4) || defined(__linux)
struct rlimit limits;
limits.rlim_cur = limits.rlim_max = RLIM64_INFINITY;
setrlimit(RLIMIT_CORE, &limits);
#endif
}

int main( int argc, char* argv[] )
{
my_allow_coredumps()
}
----8<----


--
Per Jessen, Zürich (3.0°C)
http://www.dns24.ch/ - free dynamic DNS, made in Switzerland.


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups