Tag Archives: Unix

Erastothene sieve using processes

This code computes all prime numbers using multiple processes. It illustrates the use of the pipe and the fork system calls. Note that this is by no mean an efficient approach.

Commentaires fermés Continue Reading →

Handling exceptions in C with sigsetjmp

The following piece of code proposes an answer to the question "How do I plot a function graph while handling undefined points?". For example, imagine that you provide a method to plot an arbitrary function, and that the user gives a function that is not properly defined (for example when computing x->1/x with x = [...]

Commentaires fermés Continue Reading →