[OCLUG-devel] ICFP Contest 2004

Christopher Smith x at xman.org
Wed Jun 9 15:53:34 PDT 2004


On Wed, 2004-06-09 at 15:40, Stephen Crane wrote:
> I'm not familiar with ulimit. What is it? I'm kinda new to *nix programming, 
> so sorry if this is a dumb question.

Ah, then you probably are not familiar with core files (you are going to
love those!). First of all, when in doubt, check the man page. Of course
in this case the ulimit man page will only be somewhat enlightening.
What you really want is the "bash" man page (search for ulimit).

ulimit allows you to set limits on processes/users. If you do "ulimit
-a" it displays all the settings. One of them is "maximum core files".
Since core files are normally only a concern to developers, most distros
these days set the limit on core file size to 0, effectively removing
them. You'll want to change this.

In the Unix world, when a process dies for an odd reason, it dumps the
contents of it's memory to the filesystem, so that a developer can
basically look at a snapshot of the process at the time it crashed. This
comes in real handy for post-mortem debugging.

To load up a core file in gdb, you typicall invoke it with the following
syntax:

gdb <executable name> <core file name>

-- 
Christopher Smith <x at xman.org>


More information about the OCLUG-devel mailing list