Skip to main content

nix_store_add_temp_root

Function nix_store_add_temp_root 

Source
pub unsafe extern "C" fn nix_store_add_temp_root(
    context: *mut nix_c_context,
    store: *mut Store,
    path: *const StorePath,
) -> nix_err
Expand description

Register a store path as a temporary GC root.

Calls store->addTempRoot(path). The root lasts until the process exits, or for a daemon store, until the daemon connection that carried the request closes.

§Arguments

  • context [out] - Optional. Stores error information.
  • store [in] - Nix store reference.
  • path [in] - Store path to protect from garbage collection.

§Returns

  • NIX_OK on success, otherwise a nix_err describing the failure.