MCQs > IT & Programming > C++ > Cannot read /proc//mem file even with root privilege due to permission error. How to solve it? intmem_file = open(“/proc/12345/mem”, O_RDONLY); // returns permission error

C++ MCQs

Cannot read /proc//mem file even with root privilege due to permission error. How to solve it? intmem_file = open(“/proc/12345/mem”, O_RDONLY); // returns permission error

Answer

Correct Answer: Have to send SIGSTOP/SIGCONT like below Kill(12345, SIGSTOP) intmem_file = open(“/proc/12345/mem”, O_RDONLY); … close(mem_file); kill(12345, SIGCONT);

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it