mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-26 07:57:59 -04:00
term: don't double fork new terminal windows
Instead, register their PIDs with the new reaper module and let it handle them.
This commit is contained in:
parent
f49742ebba
commit
789617d5ad
6 changed files with 62 additions and 60 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue