Hello all, I am a beginner in linux programming. I am working on a type of experimental project in which I need to execute a particular code in a system call only when the system call is called from my program.
I am thinking that a way to do this could be by using pid of the current pointer and then read the commandline attribute from /proc. But I don't know how to use the system calls from within the linux code. Also this method which I am thinking doesn't seem so elegant. Could you please suggest me how to do this or some good method of doing this.