Buna ziua,<br><br>Am reusit sa trec peste problemele mentionate anterior, totusi acum imi da eroare testul 9, desi codul care se ocupa de eroare este urmatorul :<br>Ce pot sa fac ca sa trec cu bine si testul 9 ?<br><br>Va multumesc,<br>
Alexandru.<br><br><pre>      if (pid == 0)<br>          {<br>          if (scmd == NULL || scmd-&gt;verb == NULL)<br>              exit(0);<br>          <br>          if (scmd-&gt;params == NULL)<br>              {<br>              int tmp = execlp((scmd-&gt;verb)-&gt;string, (scmd-&gt;verb)-&gt;string, (char *) NULL);<br>
              if (tmp &lt; 0)<br>                  printf(&quot;Execution failed for &#39;%s&#39;\n&quot;, (scmd-&gt;verb)-&gt;string);              <br>              exit(tmp);<br>              }        <br>          else<br>              {<br>
              char *argv[32];<br>              int i;<br>              for (i = 0; i &lt; 32; i++)<br>                  argv[i] = malloc(sizeof(char));<br>              argv[0] = (scmd-&gt;verb)-&gt;string;<br>              i = 1;<br>
              word_t *p = scmd-&gt;params;<br>              while (p != NULL)<br>                  {<br>                  if (p-&gt;expand == true)<br>                      p-&gt;string = getenv(p-&gt;string);<br>                  argv[i] = p-&gt;string;<br>
                  i++;<br>                  p = p-&gt;next_word;<br>                  }<br>              argv[i] = (char *) NULL;<br>                  <br>              /* execlp((scmd-&gt;verb)-&gt;string, (scmd-&gt;verb)-&gt;string, (scmd-&gt;params)-&gt;string, (char *) NULL); */<br>
              int tmp = execvp((scmd-&gt;verb)-&gt;string, argv);<br>              if (tmp &lt; 0)<br>                  printf(&quot;Execution failed for &#39;%s&#39;\n&quot;, (scmd-&gt;verb)-&gt;string);<br>              exit(tmp);<br>
              }<br>          }<br></pre><br>