mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
spawn: add optional reaper callback, return pid_t
This will allow spawn() callers to do things when the spawned process has terminated.
This commit is contained in:
parent
57af75f988
commit
a42f990818
6 changed files with 26 additions and 19 deletions
8
spawn.h
8
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue