Explain how you would use setrlimit(2) at the beginning of your program to aid debugging

It is common to enclose debugging code inside an ifdef statement as follows:


Some events can cause programs to abort and leave a core? le behind containing an image of the program’s memory,which can be used by a debugger to perform a postmortem analysis of the program’s execution. You could use setrlimit to set the limit for the size of a core?le to an unlimited value when debugging is desired (see Figure17). Many systems set this limit to 0 by default to inhibit the generation of core?les, so we might need to take steps to override this default. Although you can do this from the shell using the ulimit built-in command, it will affect all of the child processes created from the shell from that point onward, until the limit is reset back to 0.



Computer Science & Information Technology

You might also like to view...

The ____________ component of a user role specifies the objects with which a user can interact.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

In an office setting, instead of using a wireless broadband router, a more sophisticated device known as a(n) ____________________ is used.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following is NOT a common type of memory card?

A. SDXC B. Memory Stick PRO Duo C. MX6 D. SDHC

Computer Science & Information Technology

Passive assessments are a type of vulnerability assessment that uses network scanners to scan the network to identify the hosts, services, and vulnerabilities present in that network.

a. true b. false

Computer Science & Information Technology