mixedup_c - <<" ppid"<< getppid<< endl...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// mixedup_c.cpp / #include <unistd.h> #include <time.h> #include <stdio.h> #include <iostream.h> #include <stdlib.h> //using namespace std; / int main() { i setbuf(stdout, NULL); cout << "Child process: pid " << getpid()
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: << ", ppid " << getppid() << endl; srand((unsigned) time((time_t *) NULL)); for (int i=0; i<10; ++i) { sleep(rand()%5); cout << "c:" << i << " "; } return (0); }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online