Originally Posted by
http://linux.die.net/man/3/execl
The initial argument for these functions is the pathname of a file which is to be executed.
Your passing "./" which isnt a file, the first argument should be "./child", the file to execute.
Your remaining arguments should be fine. Note that you do keep the second argument as "CMD", even though you already specified the path and this file as the first argument. I.e.
Code:
execl("./child", "child", "my arguments", (char*)NULL);
If you still get permission denied errors, make sure the file your trying to execute can be executed, i.e. has execute permission.