Opened 5 years ago

Last modified 2 years ago

#11922 new defect

Launching tor-fw-helper should untangle stderr for control, stdout for data?

Reported by: nickm Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-fw-helper
Cc: ahf Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.)

Child Tickets

Change History (4)

comment:1 Changed 3 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:2 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:3 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:4 Changed 2 years ago by nickm

Cc: ahf added
Severity: Normal
Note: See TracTickets for help on using tickets.