[tor-commits] [tor/master] Set TOR_PT_EXIT_ON_STDIN_CLOSE=1 for client transports too.
nickm at torproject.org
nickm at torproject.org
Tue Mar 5 17:01:33 UTC 2019
commit 4578c3eb219e93da9b1aaa37c4f3c5f61c7106f5
Author: David Fifield <david at bamsoftware.com>
Date: Fri Feb 22 23:54:17 2019 -0700
Set TOR_PT_EXIT_ON_STDIN_CLOSE=1 for client transports too.
Closes #25614.
---
changes/ticket25614 | 3 +++
src/feature/client/transports.c | 10 +++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/changes/ticket25614 b/changes/ticket25614
new file mode 100644
index 000000000..ad0554902
--- /dev/null
+++ b/changes/ticket25614
@@ -0,0 +1,3 @@
+ o Minor bugfixes (pluggable transports):
+ - Tor now sets TOR_PT_EXIT_ON_STDIN_CLOSE=1 for client transports as
+ well as servers. Closes ticket 25614.
diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c
index e7ff3bf34..6fb357b46 100644
--- a/src/feature/client/transports.c
+++ b/src/feature/client/transports.c
@@ -1424,11 +1424,6 @@ create_managed_proxy_environment(const managed_proxy_t *mp)
} else {
smartlist_add_asprintf(envs, "TOR_PT_EXTENDED_SERVER_PORT=");
}
-
- /* All new versions of tor will keep stdin open, so PTs can use it
- * as a reliable termination detection mechanism.
- */
- smartlist_add_asprintf(envs, "TOR_PT_EXIT_ON_STDIN_CLOSE=1");
} else {
/* If ClientTransportPlugin has a HTTPS/SOCKS proxy configured, set the
* TOR_PT_PROXY line.
@@ -1439,6 +1434,11 @@ create_managed_proxy_environment(const managed_proxy_t *mp)
}
}
+ /* All new versions of tor will keep stdin open, so PTs can use it
+ * as a reliable termination detection mechanism.
+ */
+ smartlist_add_asprintf(envs, "TOR_PT_EXIT_ON_STDIN_CLOSE=1");
+
SMARTLIST_FOREACH_BEGIN(envs, const char *, env_var) {
set_environment_variable_in_smartlist(merged_env_vars, env_var,
tor_free_, 1);
More information about the tor-commits
mailing list