From 8f089bc017a73a19c32093c255f98dd043270cdc Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 13 Sep 2020 13:22:39 -0400 Subject: [PATCH] ncneofetch: don't leak stderr from popen --- src/fetch/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fetch/main.c b/src/fetch/main.c index 0dc16e07f..f2c5d7d07 100644 --- a/src/fetch/main.c +++ b/src/fetch/main.c @@ -100,7 +100,7 @@ pipe_getline(const char* cmdline){ } char* buf = malloc(BUFSIZ); // gatesv("BUFSIZ bytes is enough for anyone") if(fgets(buf, BUFSIZ, p) == NULL){ - fprintf(stderr, "Error reading from %s (%s)\n", cmdline, strerror(errno)); +//fprintf(stderr, "Error reading from %s (%s)\n", cmdline, strerror(errno)); fclose(p); free(buf); return NULL; @@ -116,7 +116,7 @@ pipe_getline(const char* cmdline){ static int fetch_x_props(fetched_info* fi){ - char* xrandr = pipe_getline("xrandr --current"); + char* xrandr = pipe_getline("xrandr --current 2>/dev/null"); if(xrandr == NULL){ return -1; }