Find the answer to your Linux question:
Results 1 to 6 of 6
When I first started using Linux about ten years ago, a segment violation caused a program to dump a core image before it crashed. I remember there used to be ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,190

    Do programs still dump core?


    When I first started using Linux about ten years ago, a segment violation caused a program to dump a core image before it crashed. I remember there used to be core files scattered around everywhere, and there was usually a cron job set up to get rid of them all.

    I do quite a bit of amateur programming and I often get SIGSEGV's due to doing silly things with pointers, but I haven't seen a core file in years. Has libc changed its default method for dealing with these signals?
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  2. #2
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    902
    You can still dump core look at the /etc/security/limits.conf file for settings.

  3. #3
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,024
    The bash builtin ulimit has an option -c which gives the core file size and allows you to set the size as well i.e.
    [core]
    ulimit -c unlimited
    [/core]

  4. #4
    Linux User
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    340
    You like coredumps? Or is it some sense of nostalgia when programs start failing because there's no space left in your home directory?

    I use 'ulimit -S -c 0' as a general rule to keep them at bay. Yes, I also am an amateur hacker and do silly and adventurous things with pointers all the time. It's fun. Hunting segfaults is also a hobby of mine.

    Thank God for Linux. And C. I figure I'm not on the proper learning curve if my code doesn't segfault once in a while. Always check for NULL pointers.
    Code:
    if ( p && *p ) {
            /* do something with p... */
    }
    Peace and Cheer.

  5. #5
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    902
    Quote Originally Posted by Miven View Post
    You like coredumps? Or is it some sense of nostalgia when programs start failing because there's no space left in your home directory?
    Reading core dumps is an Art. I remember when I worked at Banyan Systems we had one woman who could read core dumps like reading a newspaper. I was amazing to watch her interpret dumps.

  6. #6
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,190
    Nah, I don't want them! They were a bloody nuisance, only useful if you knew how to use gdb, and I could never work that out. I just sort-of wondered where they had gone to.

    I just did a ulimit -c and it returned zero, so that's the explanation. I didn't know about ulimit. Thanks, gregm.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •