fix test pid to use os.Getpid()