get pid macos fix