[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #11922 [Tor]: Launching tor-fw-helper should untangle stderr for control, stdout for data?



#11922: Launching tor-fw-helper should untangle stderr for control, stdout for
data?
---------------------------+------------------------------
 Reporter:  nickm          |          Owner:
     Type:  defect         |         Status:  new
 Priority:  minor          |      Milestone:  Tor: 0.2.???
Component:  Tor            |        Version:
 Keywords:  tor-fw-helper  |  Actual Points:
Parent ID:                 |         Points:
---------------------------+------------------------------
 Per discussion on #9781 :

 back in cd05f35d2cdf50, we introduced a mismatch.

 {{{
 // In the child process:
         nbytes = write(STDOUT_FILENO, error_message,
 error_message_length);

 // In the parent:
     stderr_status = log_from_pipe(child_handle->stderr_handle,
                                   LOG_INFO, filename, &retval);
 }}}

 Note that we're writing the error message to stdout, but expecting to read
 it from stderr.  To fix this for #9781, I had the code look for the error
 message in stdout too.  But the code as it stands is still doing a silly
 thing by writing a message to one fd and expecting to read it from
 another.

 (I tried to fix it by switching the child process to write to stderr, but
 that didn't work, so a cleverer fix may be needed.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11922>
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