<div dir="ltr">I read source code of the simple_shell.c and found the following code:<div><br></div><div><div>              /* child */</div><div>              execlp(buf, buf, (char *)0);</div><div>              fprintf(stderr, &quot;shell: couldn&#39;t exec %s: %s\n&quot;, buf,</div><div>                      strerror(errno));</div><div>              exit(EX_DATAERR);</div></div><div><br></div><div><br></div><div><b>Shouldn&#39;t the program print error every time? </b> The fact is that codes under execlp never get executed if execlp works properly.</div></div>