Skip to main content
1 de 11

Command execv building a shell

I'm developing a shell in C, and I'm having some problems whith de execv command. The readCommand function reads the command and saves every attribute in an array. Then i use execv(params[0],params) to execute the command but i always get an error. How can i fix it? Thanks.

Pd: If instead of execv i use system() everything goes well, but the thing is to use execv.

I can't paste the code so i let you a link to it. Sorry. http://pasted.co/fe8fdb3f