Quantcast
Browsing latest articles
Browse All 2 View Live

Answer by jdarthenay for c: how does function waitpid work?

As Joachim Pileborg suggests, this is a flushing output problem.Just use the following:int main(){ if(Fork()==0) { printf("a\n"); } else { printf("b\n"); waitpid(-1,NULL,0); } printf("c\n");...

View Article


c: how does function waitpid work?

In studying CSAPP, I encounter the practice: list all of the possible output sequences for the following program:int main(){ if(Fork()==0) { printf("a"); } else { printf("b"); waitpid(-1,NULL,0); }...

View Article

Browsing latest articles
Browse All 2 View Live