diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-23 15:10:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-23 15:10:57 -0400 |
commit | d0243e82cfcdf6684283c37f20db2d999740bdf3 (patch) | |
tree | 26e0c4891f5517d029bcd36188531476c9d652c5 | |
parent | ebda15e4b5fe4d2e154526befcc6b9ad8f635813 (diff) | |
parent | f54ac08846b98465c9d29842df0583cea98a923c (diff) | |
download | tor-d0243e82cfcdf6684283c37f20db2d999740bdf3.tar.gz tor-d0243e82cfcdf6684283c37f20db2d999740bdf3.zip |
Merge branch 'bug5099_nm' into maint-0.2.3
-rw-r--r-- | changes/bug5099 | 3 | ||||
-rw-r--r-- | src/or/transports.c | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/changes/bug5099 b/changes/bug5099 new file mode 100644 index 0000000000..4c46a396a2 --- /dev/null +++ b/changes/bug5099 @@ -0,0 +1,3 @@ + o Minor bugfixes: + - Improve log message issued when a managed proxy fails to + launch. Fixes bug 5099; bugfix on 0.2.3.6-alpha. diff --git a/src/or/transports.c b/src/or/transports.c index 1522756a52..e43ec6c480 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; } |