[Qt] Client restart #4101

pull cozz wants to merge 1 commits into bitcoin:master from cozz:cozz4 changing 15 files +81 −15
  1. cozz commented at 2:14 AM on April 28, 2014: contributor

    Adds a "Restart" option to the file and tray menu.

    restart

    I downloaded the icon somewhere where it says it is under the LGPL license.

    If an options change requires a restart, a popup appears.

    restart1

    Also encryptwallet can now restart.

    Command line options will be passed accordingly to the new process, except rescan,reindex etc.

    The parent process creates a new child process and exits. This causes the child process to inherit the open file descriptors. (Only for *nixes.) So I had to add some "fcntl" to prevent file descriptor leaks. There could still be some leaked, for example on my system with qt5, leaked descriptors for "/dev/ati/card0" get added every restart. But we dynamically raise file descriptor limit and exit if not enough available. On my system the max limit is a million by default, so I doubt that this will cause a problem to anybody, and even if, we would just exit with "Not enough file descriptors available."

    Windows does not have this issue, because there is a flag for this and QProcess::startDetached calls CreateProcess() with bInheritHandles=false. I checked the qt source code and tested this with process explorer on windows, and indeed, no handle leftovers there.

    Tested

    • Linux (qt4.8, qt5.2)
    • Windows 7 64bit qt5.2 (32 and 64 bit executables)
  2. [Qt] Client restart 4b4e9eb2e6
  3. laanwj commented at 2:22 AM on April 28, 2014: member

    I can see how this can be useful, but it feels a bit like a hack to do this at the level of Qt.

    All that the options that require 'restarting bitcoin' really need is a re-parsing of command line arguments, restarting networking, the wallet and RPC.

    A Shutdown() followed by an Init2() should (in theory) work as well to restart the core. Init2 could grow a flag to ignore one-time arguments such as rescan.

  4. cozz commented at 3:08 AM on April 28, 2014: contributor

    ok, closing.

  5. cozz closed this on Apr 28, 2014

  6. 6coind commented at 2:29 PM on December 18, 2015: none

    so was this ever actually implemented or just squashed with those comments yet nothing done?

  7. jonasschnelli commented at 2:57 PM on December 18, 2015: contributor

    @6coind: it was implemented by @cozz (this PR) but was never merged into the bitcoin master repository. IMO a restart-action within a GUI application is very uncommon and looks after a hack to me.

  8. 6coind commented at 10:08 PM on December 19, 2015: none

    @jonasschnelli I see that too , yeah this may not be such a good idea, i am trying to find a way to better manage wallets

  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me