Answer to Question #90423 in Engineering for Soraya

Question #90423
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;
Expert's answer
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be the first!

Leave a comment

New on Blog