From ec14d5f41251fadc03370c9cbe5f2e0bdb5ca9ff Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Thu, 15 Aug 2019 21:53:54 +0100 Subject: imv: Add imv_pid environment variable --- src/imv.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/imv.c b/src/imv.c index 2d948fa..0f42371 100644 --- a/src/imv.c +++ b/src/imv.c @@ -1675,6 +1675,9 @@ static void update_env_vars(struct imv *imv) { char str[64]; + snprintf(str, sizeof str, "%d", getpid()); + setenv("imv_pid", str, 1); + setenv("imv_current_file", imv_navigator_selection(imv->navigator), 1); setenv("imv_scaling_mode", scaling_label[imv->scaling_mode], 1); setenv("imv_loading", imv->loading ? "1" : "0", 1); -- cgit v1.2.3