Doesn't build under NetBSD, because uses __environ defined and needs #include and string.h and included. This is based on BSD code though. Can someone test under other operating systems? Maybe have custom /var directory for pid file