A daemon template sample code for MacOS X (BSD).