nix-super/src/libstore/build/hook-instance.hh

42 lines
567 B
C++
Raw Normal View History

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