aboutsummaryrefslogtreecommitdiff
path: root/src/or/transports.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-06-23 17:36:16 +0300
committerNick Mathewson <nickm@torproject.org>2012-06-23 15:05:46 -0400
commit8c3a4a1d21870254b38327a859bd27026058f3b2 (patch)
tree6273b8350db2465db6a6311ca50f6ec57593ee26 /src/or/transports.c
parentebda15e4b5fe4d2e154526befcc6b9ad8f635813 (diff)
downloadtor-8c3a4a1d21870254b38327a859bd27026058f3b2.tar
tor-8c3a4a1d21870254b38327a859bd27026058f3b2.tar.gz
Improve log message issued when a managed proxy fails to launch.
Diffstat (limited to 'src/or/transports.c')
-rw-r--r--src/or/transports.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/or/transports.c b/src/or/transports.c
index 1522756a5..e43ec6c48 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -697,7 +697,19 @@ handle_proxy_line(const char *line, managed_proxy_t *mp)
return;
} else if (!strcmpstart(line, SPAWN_ERROR_MESSAGE)) {
- log_warn(LD_GENERAL, "Could not launch managed proxy executable!");
+ /* managed proxy launch failed: parse error message to learn why. */
+ int retval, child_state, saved_errno;
+ retval = tor_sscanf(line, SPAWN_ERROR_MESSAGE "%x/%x",
+ &child_state, &saved_errno);
+ if (retval == 2) {
+ log_warn(LD_GENERAL,
+ "Could not launch managed proxy executable at '%s' ('%s').",
+ mp->argv[0], strerror(saved_errno));
+ } else { /* failed to parse error message */
+ log_warn(LD_GENERAL,"Could not launch managed proxy executable at '%s'.",
+ mp->argv[0]);
+ }
+
mp->conf_state = PT_PROTO_FAILED_LAUNCH;
return;
}