title: unistd's execl() without passing any arguments
body: <p>In my code I need to execute <code>/bin/bash</code>, but I wan't to do it without passing any arguments to it. I wrote this:</p>
  <pre><code>execl(&quot;/bin/bash&quot;, NULL);
  </code></pre>
  <p>Then, through some research, I realized that I also need to add type cast:</p>
  <pre><code>execl(&quot;bin/bash&quot;, (char*) NULL);
  </code></pre>
  <p>but GCC is still giving me warnings:</p>
  <pre><code>main.c:18:5: warning: null argument where non-null required (argument 2) [-Wnonnull]
       if(execl(&quot;/bin/bash&quot;, (char*) NULL) == -1) {
       ^
  main.c:18:5: warning: not enough variable arguments to fit a sentinel [-Wformat=]
  </code></pre>
  <p>What is the proper way of doing this, am I misunderstanding something, or am I using a completely wrong function call?</p>