getrusage()
, but I can't seem to figure out how to use it. This is the assignment description:The child process computes the sum of the first n prime numbers and prints the result. Then prints its process identification and the amount of CPU time it has used and finally terminates. The parent catches child's termination and performs some other computations. The parent prints the child's ID and CPU time and its own ID and CPU time and the first n prime numbers and terminates. |
a.out #
.)
|
|