got rid of dependency on posix module; replaced posix_getpid with getmypid
merged request 19.