title: execvp arguments
body: <p>Helllo everybody,</p>
  
  <p>I have this example code:</p>
  
  <pre><code>pid = fork();
  if (pid == 0) {
     execvp(argv[2],&amp;argv[2]);
     perror("Error");
  }else {
  wait(NULL);
  
  }  
  </code></pre>
  
  <p>From <code>man exec</code> I understand that </p>
  
  <blockquote>
    <p>" The first argument, by convention, should point to the filename
    associated with the file being executed".</p>
  </blockquote>
  
  <p>So, if I execute my program this way:</p>
  
  <pre><code>./a.out 5 ls
  </code></pre>
  
  <p>The command ls will be executed. </p>
  
  <p>What about the second argument? the manual says </p>
  
  <blockquote>
    <p>"The array of pointers must be terminated by a NULL pointer"</p>
  </blockquote>
  
  <p>and I don't see a NULL pointer here nor I understan what is the function of <code>&amp;argv[2]</code> here.</p>
  
  <p>Thank you very much!</p>