ProvaPratica 2009.01.15
Revision as of 15:04, 28 April 2014 by Stefano 92 (talk | contribs) (Created page with "<h1>http://www.cs.unibo.it/~renzo/so/compiti/2009-01-15.pdf</h1> == Esercizio 1 == <syntaxhighlight lang="C"> #include <stdio.h> #include <stdlib.h> #include <unistd.h> i...")
http://www.cs.unibo.it/~renzo/so/compiti/2009-01-15.pdf
Esercizio 1
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc,char*argv[])
{
int ris;
ris=fork();
while(ris>0)
{
printf("%d\n",ris);
wait(&ris);
if (WIFSIGNALED(ris))
ris=fork();
else
return(0);
}
execvp(argv[1],argv+1);
return(0);
}
stefano92