abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 637555684620efeb8579c367b7379346f0a46d23
parent df780cf6ccb39851f9e41531b80ece6bd5ed174d
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed, 21 Jun 2017 22:19:28 +0200

Use defines instead of numeric values for standard file descriptors

Diffstat:
abduco.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/abduco.c b/abduco.c @@ -446,9 +446,9 @@ static bool create_session(const char *name, char * const argv[]) { #ifdef NDEBUG int fd = open("/dev/null", O_RDWR); if (fd != -1) { - dup2(fd, 0); - dup2(fd, 1); - dup2(fd, 2); + dup2(fd, STDIN_FILENO); + dup2(fd, STDOUT_FILENO); + dup2(fd, STDERR_FILENO); close(fd); } #endif /* NDEBUG */