开发者

Preventing a process from core dump

开发者 https://www.devze.com 2023-01-23 04:46 出处:网络
Write a program in C, C++, or other suitable language (NOT a shell file) that prevents a process from writing a core dump and displays

Write a program in C, C++, or other suitable language (NOT a shell file) that prevents a process from writing a core dump and displays other limitations on what system resources can be used.

I need some guidance to understand how to create and solve this problem. My professor says to use the system command getrlimit, which makes perfect sense.

Is getrlimit(int resource, struct rlimit *rlp) a viable o开发者_C百科ption? I believe I'm overthinking this.


The manual page for getrlimit contains another entry as well. What is it? You use that other entry to implement setting the limit for core size to zero.

If we post sample code it is not going to help you learn this exercise.

0

精彩评论

暂无评论...
验证码 换一张
取 消