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 <lfleischer@calcurse.org>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user