Call setsid() for hook/notification commands

We do not want hook or notification commands to interact with the
terminal in any way. Create a new session for them.

Addresses GitHub issue #326.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2021-04-04 11:53:53 -04:00
parent 193ad3415a
commit 5398f3a24e
7 changed files with 19 additions and 12 deletions

View File

@@ -1250,8 +1250,8 @@ int parse_date_increment(const char *, unsigned *, time_t);
int parse_datetime(const char *, time_t *, time_t);
void file_close(FILE *, const char *);
void psleep(unsigned);
int fork_exec(int *, int *, int *, const char *, const char *const *);
int shell_exec(int *, int *, int *, const char *, const char *const *);
int fork_exec(int *, int *, int *, int, const char *, const char *const *);
int shell_exec(int *, int *, int *, int, const char *, const char *const *);
int child_wait(int *, int *, int *, int);
void press_any_key(void);
void print_apoint(const char *, time_t, struct apoint *);