From 1df089e1851d8e477f6969e0f25c7beb394e74e4 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 27 Feb 2024 17:25:05 +0100 Subject: [PATCH] exec: Pass name of node and config path via environment variable to sub-process Signed-off-by: Steffen Vogel --- lib/nodes/exec.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nodes/exec.cpp b/lib/nodes/exec.cpp index 0d33a76e7..faade1268 100644 --- a/lib/nodes/exec.cpp +++ b/lib/nodes/exec.cpp @@ -122,6 +122,10 @@ int ExecNode::prepare() { } int ExecNode::start() { + // Pass configuration file and node-name via environemnt + environment["VILLAS_NODE_CONFIG"] = configPath; + environment["VILLAS_NODE_NAME"] = name_short; + // Start subprocess proc = std::make_unique(command, arguments, environment, working_dir, shell);