Semaphore to avoid fork bombs.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>