[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-commit
Subject: [master] 76773e7c5 fix insignificant off-by-one in child file descriptor close code
From: Nils Goroll <nils.goroll () uplex ! de>
Date: 2018-11-22 12:29:14
Message-ID: 20181122122914.9C4C010FE06 () lists ! varnish-cache ! org
[Download RAW message or body]
commit 76773e7c51c44817de3a65a132806e5b525689b9
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Thu Nov 22 13:21:24 2018 +0100
fix insignificant off-by-one in child file descriptor close code
The name CLOSE_FD_UP_TO implies that the value is included.
Also this is the semantics of MCH_TrackHighFd() and relevant for
#define CLOSE_FD_UP_TO mgt_max_fd
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 99485af83..5072db159 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -342,7 +342,7 @@ mgt_launch_child(struct cli *cli)
*/
closelog();
- for (i = STDERR_FILENO + 1; i < CLOSE_FD_UP_TO; i++) {
+ for (i = STDERR_FILENO + 1; i <= CLOSE_FD_UP_TO; i++) {
if (vbit_test(fd_map, i))
continue;
if (close(i) == 0)
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic