api: add option "detached" in function hook_process_hashtable