From 193ad3415a0e76bf046bfcc3f03dd65742f18589 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 4 Apr 2021 11:26:46 -0400 Subject: Redirect standard descriptors for hook/notify commands Disconnect stdin, stdout and stderr when running an external hook or notification command. The previous solution of appending "<&- >&- 2>&-" to the shell command line does not work if the command includes pipes. Use shell_exec() in notify_launch_cmd() instead of a custom (and incomplete) reimplementation of that command. Partially addresses GitHub issue #326. Signed-off-by: Lukas Fleischer --- src/calcurse.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/calcurse.h') diff --git a/src/calcurse.h b/src/calcurse.h index b006a77..ad6353c 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -671,7 +671,6 @@ struct nbar { char datefmt[BUFSIZ]; /* format for displaying date */ char timefmt[BUFSIZ]; /* format for displaying time */ char cmd[BUFSIZ]; /* notification command */ - const char *shell; /* user shell to launch notif. cmd */ unsigned notify_all; /* notify all appointments */ pthread_mutex_t mutex; }; -- cgit v1.2.3-54-g00ecf