I'm currently writing a C program and one of the constraints is that I cannot invoke external programs using system. Instead, I need to work within the idiom of the language using system calls from within the C/C++ library. I'm having some troubles understanding the difference between "system" calls and "C/C++ system" calls.
Is system simply platform dependent while "C system" calls builds ontop of system and automatically changes its execution based on the platform being used?
Hope my question is clear. Thanks in advance!
freadandfopenor ratheropenandread?systemjust spawn a shell command to start any binary (or shell builtin) that you ask for. A system call is a call to a "feature" of the kernel, feature that kernel is the only one able to perform (i.e. "really" accessing hardware). Of course a program spawned bysystemcan/will use system calls. I guess here that the goal is to force you to do it all, not relying on an existing binary that will do it for you.openwas the one I had in mind but it was more of a general question.