I have this homework : 1- how can you avoid repeated messeges for this code?
2-Pay attention to the order of completion of the processes,
• what do you observe?
• why?
I tried to delete some spaces around = and put spaces around " but still have the error messege!
# include <sys/ types .h>
# include <sys/ wait .h>
# include <unistd .h>
# include <stdio .h>
# include <stdlib .h>
int main (){
int va;
pid_t idprograma ;
for (va =0; va <3; va ++) {
idprograma = fork ();
printf ("Soy el proceso de PID %d y mi padre tiene %d de PID .\
n", getpid () , getppid ());
if( idprograma != 0)
break ;
srandom ( getpid ());
sleep ( random () %3);
}
if( idprograma != 0)
printf ("Fin del proceso de PID %d.\n", wait ( NULL ));
return 0;
}
1
Expert's answer
2019-05-31T07:55:00-0400
Dear Soraya, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment