'Load a kext by forking into kextload.'

def LegacyKextload(self, cf_bundle_url, dependency_kext):

    _ = dependency_kext
    error_code = OS_SUCCESS
    cf_path = self.dll.CFURLCopyFileSystemPath(cf_bundle_url, POSIX_PATH_STYLE)
    path = self.CFStringToPystring(cf_path)
    self.dll.CFRelease(cf_path)
    try:
        subprocess.check_call(['/sbin/kextload', path])
    except subprocess.CalledProcessError as cpe:
        logging.debug('failed    to    load    {0}:{1}'.format(path, str(cpe)))
        error_code = (-1)
    return error_code
