Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::HookInstance Struct Reference

#include <hook-instance.hh>

Public Member Functions

 HookInstance (const Strings &buildHook, std::chrono::milliseconds timeout)

Public Attributes

Pipe toHook
Pipe fromHook
Pipe builderOut
Pid pid
FdSink sink
std::map< ActivityId, Activity > activities
std::function< void()> onKillChild

Detailed Description

Note
Sometimes this is owned by the Worker, and sometimes it is owned by a Goal. This is for efficiency: rather than starting the hook every time we want to ask whether we can run a remote build (which can be very often), we reuse a hook process for answering those queries until it accepts a build. So if there are N derivations to be built, at most N hooks will be started.

Member Data Documentation

◆ builderOut

Pipe nix::HookInstance::builderOut

Pipe for the builder's standard output/error.

◆ fromHook

Pipe nix::HookInstance::fromHook

Pipe for the hook's standard output/error.

◆ onKillChild

std::function<void()> nix::HookInstance::onKillChild

Callback to run when the hook process is killed in the destructor. Used to call Worker::childTerminated.

◆ pid

Pid nix::HookInstance::pid

The process ID of the hook.

◆ toHook

Pipe nix::HookInstance::toHook

Pipes for talking to the build hook.


The documentation for this struct was generated from the following files:
  • libstore/unix/include/nix/store/build/hook-instance.hh
  • libstore/unix/build/hook-instance.cc