pid file support #139

pull gjs278 wants to merge 29 commits into bitcoin:master from gjs278:master changing 33 files +638 −229
  1. gjs278 commented at 11:32 AM on April 2, 2011: contributor

    the daemon will log to a pidfile

  2. Update Spanish translation. f30dabb2ac
  3. Updated dutch translation a07dca7cd2
  4. daemon-mode: add sleep() loop to prevent defunct child process, call setsid() in child 1c09a4adb2
  5. catch SIGINT, SIGHUP and SIGSEGV and shutdown cleanly c3f140033c
  6. Merge branch 'dutchloc' of https://github.com/sipa/bitcoin into tmp d38e683a6f
  7. Merge branch 'master' of https://github.com/smola/bitcoin into tmp 0b8e4738f9
  8. [locale] Regenerate es, nl binary message catalogs 8203ec4b11
  9. Merge branch 'master' of git://github.com/bitcoin/bitcoin 3a47bf7265
  10. allow coredumps by not catching SIGSEGV 454bc86479
  11. Allow UPnP mapping when USE_UPNP is defined and miniupnpc is installed at build time(statically linked).
    Thanks joepie91 for the translation of the new copyright notices into Dutch.
    Thanks sipa for the translation of the new copyright notices into French.
    Thanks megu for the translation of the new copyright notices into Spanish.
    Thanks justmoon/Blitzboom for the translation of the new copyright notices into German.
    Thanks Joozero for the translation of the new copyright notices into Italian.
    Remaining translations were provided by Google Translate.
    8bb5edc1c9
  12. Update DNS seed list a2b6c1930d
  13. pid support db3c10a5b8
  14. jgarzik commented at 6:42 PM on April 2, 2011: contributor

    I like the idea of writing a PID file. It is good practice, at least on *nix. I also like that you made the default the bitcoin data directory.

    Review comments:

    1. pid file should include a newline
    2. have you verified the PID written is post-daemonize? I am too lazy to check right now, and it is unclear from the patch.
    3. the PID file should be removed on shutdown. stale PID files are undesirable.
  15. gjs278 commented at 8:29 PM on April 2, 2011: contributor
    1. newline is fine idea, I'll throw in a \n
    2. the pid always seems to match the bitcoind -server process for me so I believe it is accurate
    3. this I realized as soon as I did the pull request. do you know a crossplatform method I should use to delete the file? I always run into trouble with unlink and stuff when I hit win32 platforms. thanks.
  16. jgarzik commented at 8:35 PM on April 2, 2011: contributor

    Check the boost docs... boost does everything :)

  17. added newline to pidfile, removing on shutdown b67f0655c2
  18. Fix deadlocks in setaccount, sendfrom RPC calls
    SendMoney*() now requires caller to acquire cs_main.
    GetAccountAddress() now requires caller to acquire cs_main, cs_mapWallet.
    
    Ordering is intended to match these two callchains[1]:
    
    1. CRITICAL_BLOCK(cs_main)
        ProcessMessage(pfrom, strCommand, vMsg)
            AddToWalletIfMine()
                  AddToWallet(wtx)
                      CRITICAL_BLOCK(cs_mapWallet)
    
    2. CRITICAL_BLOCK(cs_main)
        ProcessMessage(pfrom, strCommand, vMsg)
            AddToWalletIfMine()
                  AddToWallet(wtx)
                      CRITICAL_BLOCK(cs_mapWallet)
                          walletdb.WriteName(PubKeyToAddress(vchDefaultKey), "")
                              CRITICAL_BLOCK(cs_mapAddressBook)
    
    Spotted by ArtForz.  Additional deadlock fixes by Gavin.
    
    [1] http://www.bitcoin.org/smf/index.php?topic=4904.msg71897#msg71897
    f5f1878ba1
  19. RPC sendmany must acquire cs_main lock 6f074b71bb
  20. Merge branch 'deadlock-fixes' of https://github.com/jgarzik/bitcoin 57b7fe4e6f
  21. Fixed issue 76 -- RPC error where addresses from addressbook's sending tab appear in listaccounts 0a4cb86976
  22. Report immature coinbase transactions in listtransactions
    Report coin generation transactions as 'category':'immature' until they have 120 confirmations (when they are reported as 'category':'generate', as before).
    If the block they are in is not part of the main chain (you lost a 'block race'), then they are reported as 'category':'orphan' (with 0 confirmations).
    198fd7b0bd
  23. rfc1123Time: increase buffer size for time string
    Make sure we can accomodate all possibilities.
    d98beea894
  24. disable -daemon on windows; bitcoind forks only with -daemon set
    [added setsid() call to ui.cpp, to regain consistency with init.cpp -jgarzik]
    d12ea887bc
  25. Merge branch 'spentpertxout' of https://github.com/sipa/bitcoin 2e8b33824f
  26. Merge branch 'upnp' of https://github.com/TheBlueMatt/bitcoin 79706a8e48
  27. Merge branch 'spentpertxout' of https://github.com/sipa/bitcoin d89d456655
  28. Merge branch 'listimmature' of /Users/gavin/src/gavin_btc 485dda9774
  29. gavinandresen commented at 9:42 PM on April 12, 2011: contributor

    Nice. Can you rebase so the two commits are one, and maybe commit --author='gjs278 <blame_me@somewhere.com>' instead of 'root' ?

  30. pid support 3f4e5e7aa6
  31. added newline to pidfile, removing on shutdown 95c09a77f9
  32. pid support c26499cafa
  33. Merge branch 'pidfile' of https://github.com/gjs278/bitcoin into pidfile 631c2cda25
  34. Merge branch 'master' into pidfile 379147a646
  35. gjs278 commented at 12:07 AM on April 13, 2011: contributor

    ugh. I hate working with git. I can't figure out this master pull rebase crap. I'm just going to make a new repo and put my changes into one commit.

  36. gjs278 closed this on Apr 13, 2011

  37. sipa referenced this in commit e958c5a3c9 on Dec 6, 2014
  38. glv2 referenced this in commit 08575619b6 on Dec 7, 2014
  39. sipa referenced this in commit 4903b80d6a on Dec 7, 2014
  40. sipa referenced this in commit ecae2acb06 on Dec 11, 2014
  41. TheBlueMatt referenced this in commit 582b2934e6 on Oct 20, 2015
  42. ptschip referenced this in commit 9b4228dcad on Nov 6, 2016
  43. rebroad referenced this in commit cdedba65a1 on Dec 7, 2016
  44. deadalnix referenced this in commit 69dcaab08d on Jan 19, 2017
  45. jtimon referenced this in commit fd3447f28b on Apr 20, 2017
  46. cryptapus referenced this in commit f2c97a6ddc on Feb 19, 2019
  47. attilaaf referenced this in commit 41f88896d6 on Jan 13, 2020
  48. Losangelosgenetics referenced this in commit 313f65ebb6 on Mar 12, 2020
  49. rajarshimaitra referenced this in commit 624265fa63 on Mar 23, 2021
  50. rajarshimaitra referenced this in commit b26c5279ca on Aug 5, 2021
  51. 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-13 21:16 UTC

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