You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Esempio: execl<br />
main()<br />
{int pid, status;<br />
pid=fork();<br />
if (pid==0)<br />
}<br />
{execl(“/bin/ls”, “ls”,”-l”,”pippo”,(char *)0);<br />
printf(“exec fallita!\n”);<br />
exit(1);<br />
else if (pid >0)<br />
{ pid=wait(&status);<br />
}<br />
/* gestione dello stato.. */<br />
else printf(“fork fallita!);<br />
}<br />
NB: in caso di successo, l’ exec è una chiamata senza ritorno<br />
M-fosset - Sistemi Operativi 2004-2005