notify: break out command template expansion to spawn_expand_template()

This commit is contained in:
Daniel Eklöf 2021-01-31 14:40:27 +01:00
parent 4233c806c3
commit 06aba59430
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 97 additions and 60 deletions

View file

@ -1,7 +1,13 @@
#pragma once
#include <stdbool.h>
#include "config.h"
#include "reaper.h"
bool spawn(struct reaper *reaper, const char *cwd, char *const argv[],
int stdin_fd, int stdout_fd, int stderr_fd);
bool spawn_expand_template(
const struct config_spawn_template *template,
size_t key_count, const char *key_names[static key_count],
const char *key_values[static key_count], size_t *argc, char ***argv);