Why changes to /etc/limits doesn't work

2.1k views Asked by At

I am trying to provide support for core dump on my ARM based target ,I have read about both /etc/limits and /etc/security/limits.conf ,My target file system doesn't have the later one on to it ,So I have made below changes to /etc/limits

root C100000

After adding this line to /etc/limits was expecting the generation of core file but ulimit -a shows me

core file size (blocks, -c) 0

Why these changes into /etc/limits does not at all reflecting.

Now what should I have to do ?

Do I have to add /etc/security/limits.conf to my filesystem??

I am not looking at option of using setrlimit().

1

There are 1 answers

1
Amit Singh Tomar On

Thanks everone for the help you did to me,The way I solved this problem is to set following defaults in /etc/systemd/system.conf

 DefaultLimitCORE=infinity  
 DumpCore=yes

This file was already there in my filesystem and it generates core dump for process started from login Shell as well as process started from systemd .

Below given thread is quite useful and is source of reference for me.

http://lists.freedesktop.org/archives/systemd-devel/2013-February/009174.html