aboutsummaryrefslogtreecommitdiff
path: root/spawn.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-07-23 04:57:30 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-07-23 05:17:21 +0000
commita42f99081876dd02e28b931f7c0e70230355bb58 (patch)
treec49e60ec7ce07cead0767afd8d2bd896679a32af /spawn.h
parentosc: kitty notifications: use body as title, if no title is set (diff)
spawn: add optional reaper callback, return pid_t
This will allow spawn() callers to do things when the spawned process has terminated.
Diffstat (limited to 'spawn.h')
-rw-r--r--spawn.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/spawn.h b/spawn.h
index 0fc95041..1693f1a8 100644
--- a/spawn.h
+++ b/spawn.h
@@ -1,12 +1,14 @@
#pragma once
#include <stdbool.h>
+#include <unistd.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,
- const char *xdg_activation_token);
+pid_t spawn(struct reaper *reaper, const char *cwd, char *const argv[],
+ int stdin_fd, int stdout_fd, int stderr_fd,
+ reaper_cb cb, void *cb_data, const char *xdg_activation_token);
bool spawn_expand_template(
const struct config_spawn_template *template,