summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-08-07 09:52:02 -0700
committerlouie <lshprung@yahoo.com>2020-08-07 09:52:02 -0700
commite18d3c68404ba89e7166ed1c81ceba1cc5a29d6c (patch)
tree234ef4d59349ec6080039f174bd9a9006c4d8d9a /draw.c
parent67cbcca403dbf0917af35d0444a635ff3b2764a5 (diff)
stdout (and stderr) is now redirected to /dev/null
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c6
1 files 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();