title: Commands like "ls -l" not executing in execl, whereas in execvp it works
body: <p>Using the code below in the <code>execl</code> variant, <code>ls</code> works, but <code>ls -l</code> does not work, but in my <code>execvp</code> approach <code>ls</code> and <code>ls-l</code> works. The reason why I adopted the <code>execl</code> approach is because the path of the binaries could differ whereas <code>execvp</code> did not provide me that feature. Ideally I want <code>execl</code> to also work on <code>ls -l</code>, but right now it does not work on <code>ls -l</code>. I tried reading the man pages but it did not help.</p>
  
  <pre><code>void child(int argc, char *argv[MAX_ARGS])
  {
          execvp(argv[0], argv);
  }
  
  
  void child(char *argv[], char* path)
  {
          execl(path, argv, NULL);
  }
  </code></pre>