title: C: execvp() and command line arguments
body: <p>So I'm writing a program where the <em>arguments are as follows</em>:</p>
  
  <pre><code>program start emacs file.c
  </code></pre>
  
  <p>or even</p>
  
  <pre><code>program wait
  </code></pre>
  
  <p>In essence, the first argument (argv[0]) is the program name, followed by user inputs. </p>
  
  <p>Inside my code, I invoke execvp. Thing is, I'm not entirely sure I'm invoking the right arguments. </p>
  
  <pre><code>if (pid == 0) { 
                      execvp(argv[1], argv); //Line of interest
                      exit(1);
                      }
  </code></pre>
  
  <p>are argv[1] and argv the correct arguments to pass for the functionality described above? I looked at the man page and they make sense but might not be correct for this case.
  Thank you!</p>