Nix/src/libstore/build/hook-instance.hh
John Ericson ac89bb064a Split up util.{hh,cc}
All OS and IO operations should be moved out, leaving only some misc
portable pure functions.

This is useful to avoid copious CPP when doing things like Windows and
Emscripten ports.

Newly exposed functions to break cycles:

 - `restoreSignals`
 - `updateWindowSize`
2023-11-05 12:20:02 -05:00

42 lines
567 B
C++

#pragma once
///@file
#include "logging.hh"
#include "serialise.hh"
#include "processes.hh"
namespace nix {
struct HookInstance
{
/**
* Pipes for talking to the build hook.
*/
Pipe toHook;
/**
* Pipe for the hook's standard output/error.
*/
Pipe fromHook;
/**
* Pipe for the builder's standard output/error.
*/
Pipe builderOut;
/**
* The process ID of the hook.
*/
Pid pid;
FdSink sink;
std::map<ActivityId, Activity> activities;
HookInstance();
~HookInstance();
};
}