Skip to content

Tag: c++

Pointers given from user space to kernel space are null

Sorry if this question has been asked before as it seems kind of basic, but I can’t find it anywhere on this site. I’m doing OS programming with linux (debian) and I’m trying to give a pointer from my user space to my kernel space function. Namely in the userspace I do and in the kernel spac…

SigCgt value is not getting updated in /proc//status file?

I have read about the signal handling in linux processes. I am using centOS 7.1 (kernel 3.10+). I am registering handler only for SIGTERM in my c++ program. As per my knowledge(not sure if my assumptions are correct). We can check all the signals a process is listening to in /proc/$pid/status file by using Si…

Why is execvp() executing twice using fork()?

I am implementing a shell. When attempting a command other than changing directories, execvp() runs, the child terminates and a new child is created. When I change directories, the child does not terminate and a new child is created. Here is a sample of my code: cd ../; ls; runs correctly, except I have to Ct…

How to execute a shell script using CMake post_build?

How to execute a shell script using CMake? The command that should be run is my_script that should be executed after build. The CMakeLists.txt DISCLAIMER Yes, there are similar questions in SO here, here, here, etc; however, they don’t give me a clear vision how this can be achieved. Answer You are invo…

Mono and Array.Sort

How can I use Array.Sort(someArray) in Mono with the Monodevelop !? I’m using Mono 4.2.2 and Monodevelop 5.10. Did I has to import some namespace? Which one? Is there another method to use? I’ve been trying that and don’t works: Answer Array is in the System namespace and is included within …