From 256cbdbeb8582f19f4a854967464ee67eeb3c338 Mon Sep 17 00:00:00 2001 From: afify Date: Sat, 22 May 2021 08:51:11 +0300 Subject: [PATCH] [remove] spawn stderr to /dev/null - could be a patch --- sfm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sfm.c b/sfm.c index 6289963..e8f2023 100644 --- a/sfm.c +++ b/sfm.c @@ -1119,7 +1119,7 @@ frules(char *ex) static int spawn(const void *v, char *fn) { - int ws, x, argc, fd; + int ws, x, argc; pid_t pid, r; x = 0; @@ -1141,11 +1141,8 @@ spawn(const void *v, char *fn) case -1: return -1; case 0: - fd = open("/dev/null", O_WRONLY); - dup2(fd, STDERR_FILENO); execvp(argv[0], argv); exit(EXIT_SUCCESS); - close(fd); default: while ((r = waitpid(pid, &ws, 0)) == -1 && errno == EINTR) continue; -- 2.11.4.GIT