From e18d3c68404ba89e7166ed1c81ceba1cc5a29d6c Mon Sep 17 00:00:00 2001 From: louie Date: Fri, 7 Aug 2020 09:52:02 -0700 Subject: stdout (and stderr) is now redirected to /dev/null --- draw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/draw.c b/draw.c index 2c2fa3d..2e41b3b 100644 --- a/draw.c +++ b/draw.c @@ -52,7 +52,7 @@ int main(int argc, char **argv){ bool tall = true; //is the window a certain height (tbd what the threshold should be TODO) bool wide = true; //is the window a certain width (tbd what the threshold should be TODO) int input; - char *full_command; //what will be executed + char full_command[BUF_LEN]; //what will be executed //if a config path was given as an argument, set it accordingly if(argc > 2 && (!strcmp(argv[1], "-c") || !strcmp(argv[1], "--cfg_path"))) cfg_path = argv[2]; @@ -133,7 +133,9 @@ int main(int argc, char **argv){ #if defined _WIN32 || defined _WIN64 win_launch(); #else - full_command = get_launch(); + //TODO create option to redirect stdout and stderr to avoid writing over the ncurses instance + strcpy(full_command, get_launch()); + strcat(full_command, " > /dev/null 2>&1"); system(full_command); #endif refresh(); -- cgit