nativized res detection on BSDs (prelim)