[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #5557 [Tor Bridge]: Tor helpers' launch error message contains useless whitespace
#5557: Tor helpers' launch error message contains useless whitespace
------------------------+---------------------------------------------------
Reporter: asn | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Tor: 0.2.3.x-final
Component: Tor Bridge | Version:
Keywords: | Parent:
Points: | Actualpoints:
------------------------+---------------------------------------------------
While playing with #5099, I noticed that the spawn error message that Tor
uses to denote "launch failure" usually looks like this:
{{{
ERR: Failed to spawn background process - code 9/2
}}}
The whitespace between 'code' and '9/2' occurs because
`format_helper_exit_status()` writes the last part of that string in
reverse order, after first populating it with whitespace.
That is mainly an aesthetics issue but it also bugs `log_from_pipe()`
since it uses `tor_sscanf()` to parse the error message, but without
taking the whitespace into account:
{{{
retval = tor_sscanf(buf, SPAWN_ERROR_MESSAGE "%x/%x",
&child_state, &saved_errno);
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5557>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs