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.
精彩评论