[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #32034 [Core Tor/Tor]: tor reads PT protocol messages from stderr
#32034: tor reads PT protocol messages from stderr
--------------------------+------------------------------------
Reporter: dcf | Owner: neel
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor | Version: Tor: 0.4.2.2-alpha
Severity: Normal | Resolution:
Keywords: tor-pt | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Comment (by ahf):
I think the example script have a bug: The `echo`'s in the subshell writes
to standard out and you redirect all output from the subshell from
standard error to standard out, where instead it should be redirect all
output from the subshell's standard out to standard error, so `1>&2`
instead of `2>&1`.
The example with `wc` also shows this, as the redirect to `/dev/null`
should still show the three lines to standard error:
{{{
user@tor-dev:~$ ./test-fake-pt.sh > /dev/null | wc -l
0
VERSION 1
SMETHOD testpt 127.0.0.1:9999
SMETHODS DONE
}}}
Tor's PT standard error handler does not send the standard error messages
into the PT state machine handler and logs the errors with the warning log
level. I do think that's a bit higher than what we want for this kind of
event, so I'm submitting a patch in a moment that lowers the log level for
PT standard error messages from warning to debug.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32034#comment:5>
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