Monday, February 06, 2006

Processes in C: /dev/urandom C code, forking several child processes...


Sorry, I've been busy with courses AND research lately, it 's given me less time to post on the blog.

For an OS course, we have to do the Miller-Rabin test for primality, and it involves forking atleast 3 child processes; getting random numbers from /dev/urandom, etc.

Here is some code for having 2 or more child processes:

For reading from /dev/urandom (and why that's a good idea):

No comments: