Find the answer to your Linux question:
Results 1 to 4 of 4
Hi. Anybody knows why the following program did not generate a core file? #include <stdlib.h> void main() { abort() } It's running un a redhat linux, kernel 2.4 with gcc3.2 ...
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    5

    Thumbs down abort() did not coredump

    Hi.

    Anybody knows why the following program did not generate a core file?


    #include <stdlib.h>
    void main() {
    abort()
    }


    It's running un a redhat linux, kernel 2.4 with gcc3.2


    $ uname -a
    Linux aquila.ats-ar.com.ar 2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux

    $ gcc -v
    Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
    Thread model: posix
    gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)


    Thanks

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Hi,

    On most Linux systems this is turned off. To enable this you can use the "ulimit -c" command.

    To check the value:
    Code:
    ulimit -c
    To set the maximum size of core files created:
    Code:
    ulimit -c <your value>
    To turn off core dumps:
    Code:
    ulimit -c 0

    Regards

  3. #3
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    Try using:
    Code:
    ulimit -c unlimited
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

  4. #4
    Just Joined!
    Join Date
    Aug 2007
    Posts
    5
    Quote Originally Posted by kyku View Post
    Try using:
    Code:
    ulimit -c unlimited
    Thanks, it worked.

Posting Permissions

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