I'm creating a shell copy and I have a problem to executable an homemade program. I mean, everything is OK when I want to execute somethings like java
, ls
, wc
, etc... everything that is already present in the PATH variable.
Now I want to be able to execute a "myls" command which is a copy of the original ls
. The thing is that my program isn't registered in PATH variable, so when I try to execvp("myls", …)
, I get an error "no such file or directory".
I would like to know how can I manage this problem and be able to execute my command according this hierarchy :
src
include
bin
makefile
executable <- this one is my main executable
myLs
executableLS <- would like to be able to call this one through execvp
myPs
executablePS <- would like to be able to call this one through execvp