Patch for FreeBSD setpgrp() as suggested by Alexander Lazic