here is some more info, i have discovered:
In fs/binfmt_elf, function elf_core_dump() takes care of core dump file generation
The variable unsigned long limit = current->signal->rlim[RLIMIT_CORE].rlim_cur;
has limit either for filesize and/or corefile size(I am not sure of this, however).
This particular code writes to dump file:
if ((size += PAGE_SIZE) > limit || !dump_write(file, kaddr, PAGE_SIZE)) {
kunmap(page);
page_cache_release(page);
goto end_coredump;
}
The above loops from vma->vm_start to vma->vm_end
where vm = current->mm->mmap
What i am here confused is what value does rlim_current have, is it the one with "-c" (core file size)option of one with "-f"(file size) option?
As I understand, it must be one with "-f" option, in that case, what does "-c" sets for current process?
Regards
Anuz.
On Sat, Jul 25, 2009 at 9:59 AM, Anuz Pratap Singh Tomar <chambilkethakur@xxxxxxxxx> wrote:
As I understand, it must be one with "-f" option, in that case, what does "-c" sets for current process?
Regards
Anuz.
On Sat, Jul 25, 2009 at 9:59 AM, Anuz Pratap Singh Tomar <chambilkethakur@xxxxxxxxx> wrote:
http://www.linuxforums.org/forum/linux-programming-scripting/124829-ulimit-not-limiting-core-file-size.htmlHmmm, could it be because additional ELF file header, section, symbol
etc in core file? This is just my personal guess
This is what someone else explained in some forum, but still its more of a guess work:
I wanted to know, is it a bug or its just the way it is defined?
Thanks
Anuz