Skip to content
Snippets Groups Projects
Closed Tor Browser should print error messages on startup failure
  • View options
  • Tor Browser should print error messages on startup failure

  • View options
  • Closed Issue created by cypherpunks

    This is related to legacy/trac#20238 (moved) (and legacy/trac#20237 (moved) and legacy/trac#19851 (moved)). When the Browser failed to start, it produced absolutely no output. It just exited with an error status like 134, which luckily I was able to see because my $PS1 includes $?.

    I understand you don't want the browser leaking data into .xsession-errors or whatever, but this is clearly not the ideal way to do it. Nobody who's unfamiliar with Unix debugging would figure out what's happening.

    Could you redirect these fds later in the startup process? I don't know if the Browser uses fork()--it would have to happen before that, and obviously before any network access might happen. You'd need to do something like this in the C code: fd=open("/dev/null",O_WRONLY|O_CLOEXEC); dup2(fd, 1); dup2(fd, 2); close(fd); but with proper error checking.

    Even better, write a wrapper process that does not use ASan or other experimental features, that will execute the browser and pop a GUI window with stdout/stderr text on a nonzero exit status. And offer to restart it, like the Browser does when Tor crashes. Maybe even try to detect what's wrong--using the error text, or exit status, or by "unit-testing" some features that have caused trouble in the past--and work around it or suggest the fix.

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading