aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-05-21 18:17:29 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-05-21 18:17:29 +0000
commit789617d5ad3f4d7019e3086d515aa44f111dd0d8 (patch)
treecfbc1ccb4af025a3ee60046a411332c63cc6fdf3 /terminal.h
parentreaper: new module, uses a signalfd to wait() on child processes (diff)
term: don't double fork new terminal windows
Instead, register their PIDs with the new reaper module and let it handle them.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/terminal.h b/terminal.h
index 395557db..295db8e8 100644
--- a/terminal.h
+++ b/terminal.h
@@ -13,6 +13,7 @@
//#include "config.h"
#include "fdm.h"
+#include "reaper.h"
#include "wayland.h"
#define likely(c) __builtin_expect(!!(c), 1)
@@ -206,6 +207,7 @@ enum term_surface {
struct terminal {
struct fdm *fdm;
+ struct reaper *reaper;
const struct config *conf;
pid_t slave;
@@ -439,8 +441,9 @@ struct terminal {
struct config;
struct terminal *term_init(
- const struct config *conf, struct fdm *fdm, struct wayland *wayl,
- const char *foot_exe, const char *cwd, int argc, char *const *argv,
+ const struct config *conf, struct fdm *fdm, struct reaper *reaper,
+ struct wayland *wayl, const char *foot_exe, const char *cwd,
+ int argc, char *const *argv,
void (*shutdown_cb)(void *data, int exit_code), void *shutdown_data);
bool term_shutdown(struct terminal *term);