dash/test/lint
Vijay Das Manikpuri 6a2c6ac2a9
Merge #15278: Improve PID file error handling
3782075a5fd4ad0c15a6119e8cdaf136898f679e Move all PID file stuff to init.cpp (Hennadii Stepanov)
561e375c73a37934fe77a519762d81edf7a3325c Make PID file creating errors fatal (Hennadii Stepanov)
745a2ace18ce857bc712d7e66c8bad7c082c07e2 Improve PID file removing errors logging (Hennadii Stepanov)

Pull request description:

  Digging into #15240 the lack of the proper logging has been discovered.
  Fixed by this PR.

  UPDATE (inspired by @laanwj's [comment](https://github.com/bitcoin/bitcoin/pull/15278#discussion_r252641810)):
  Not being able to create the PID file is fatal now.

  Output of `bitcoind`:

  ```
  $ src/bitcoind -pid=/run/bitcoind/bitcoind.pid
  2019-02-01T23:20:10Z Bitcoin Core version v0.17.99.0-561e375c7 (release build)
  2019-02-01T23:20:10Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.
  2019-02-01T23:20:10Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463
  2019-02-01T23:20:10Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
  2019-02-01T23:20:10Z Using RdRand as an additional entropy source
  2019-02-01T23:20:11Z Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory
  Error: Unable to create the PID file '/run/bitcoind/bitcoind.pid': No such file or directory
  2019-02-01T23:20:11Z Shutdown: In progress...
  2019-02-01T23:20:11Z Shutdown: Unable to remove PID file: File does not exist
  2019-02-01T23:20:11Z Shutdown: done
  ```

  Output of `bitcoin-qt`:
  ![screenshot from 2019-02-02 01-19-05](https://user-images.githubusercontent.com/32963518/52154886-9349b600-2688-11e9-8128-470f16790305.png)

  **Notes for reviewers**
  1. `CreatePidFile()` has been moved from `util/system.cpp` to `init.cpp` for the following reasons:
  - to get the ability to use `InitError()`
  - now `init.cpp` contains code of both creating PID file and removing it

  2. Regarding 0.18 release process: this PR modifies 1 string and introduces 2 new ones.

Tree-SHA512: ac07d0f800e61ec759e427d0afc0ca43d67f232e977662253963afdd0a220d34b871050f58149fc9fabd427bfc8e0d3f6a6032f2a38f30ad366fc0d074b0f2b3

Merge #15278: Improve PID file error handling
2021-09-06 19:02:59 +05:30
..
check-doc.py Merge bitcoin#14272: init: Remove deprecated args from hidden args (#4335) 2021-08-17 22:53:28 +03:00
check-rpc-mappings.py
commit-script-check.sh Merge #14864: test: Run scripted-diff in subshell 2021-08-15 11:08:08 -04:00
git-subtree-check.sh Merge #17329: linter: Strip trailing / in path for git-subtree-check 2021-07-13 20:43:16 -05:00
lint-all.sh Merge #16036: travis: Run all lint scripts even if one fails 2021-07-10 12:10:51 -05:00
lint-assertions.sh Merge #14088: tests: Don't assert(...) with side effects 2021-07-01 16:33:23 -05:00
lint-circular-dependencies.sh Merge #12490: [Wallet] [RPC] Remove deprecated wallet rpc features from bitcoin_server (#4380) 2021-08-31 23:31:31 -04:00
lint-cpp.sh partial merge bitcoin#19844: lint: add C++ code linter 2021-08-21 15:33:37 -05:00
lint-cppcheck-dash.sh lint: add dash extended cpp linter 2021-09-01 14:08:52 -04:00
lint-filenames.sh
lint-format-strings.py merge #14954: Require python 3.5 2021-08-31 11:16:12 +05:30
lint-format-strings.sh
lint-git-commit-check.sh Fix lint-git-commit-check.sh (#4267) 2021-07-19 12:32:12 +03:00
lint-include-guards.sh partial merge #17398: Update leveldb to 1.22+ (#4230) 2021-07-15 15:42:55 -05:00
lint-includes.sh Backports v0.18: PR 13743: refactor: Replace boost::bind with std::bind (#4343) 2021-08-17 23:31:09 +03:00
lint-locale-dependence.sh Merge #15278: Improve PID file error handling 2021-09-06 19:02:59 +05:30
lint-logs.sh
lint-python-dead-code.sh Merge #14519: tests: add utility to easily profile node performance with perf 2021-08-18 22:24:36 -03:00
lint-python-utf8-encoding.sh partial merge #17398: Update leveldb to 1.22+ (#4230) 2021-07-15 15:42:55 -05:00
lint-python.sh Fix 15219 2021-08-24 19:16:52 -04:00
lint-qt.sh Merge #13529: Use new Qt5 connect syntax 2021-08-23 12:12:31 -04:00
lint-shebang.sh Partial Merge #14831: Scripts and tools: Use #!/usr/bin/env bash instead of #!/bin/bash. 2021-08-15 11:08:08 -04:00
lint-shell-locale.sh Partial merge #13863: travis: move script sections to files in .travis/ subject to shellcheck 2021-07-08 13:09:43 -04:00
lint-shell.sh merge #20359: Various config.site.in improvements and linting 2021-09-03 21:35:53 +05:30
lint-spelling.ignore-words.txt Merge #16618: [Fix] Allow connection of a noban banned peer 2021-07-19 19:00:04 -05:00
lint-spelling.sh Merge #16767: test: Check for codespell in lint-spelling.sh 2021-08-11 13:58:48 -04:00
lint-submodule.sh Merge #18056: ci: Check for submodules 2021-07-13 21:17:15 -05:00
lint-tests.sh
lint-whitespace.sh build: add libgmp detection, make immer a package (#4311) 2021-08-10 22:35:55 +03:00
README.md partial merge #17398: Update leveldb to 1.22+ (#4230) 2021-07-15 15:42:55 -05:00

This folder contains lint scripts.

check-doc.py

Check for missing documentation of command line options.

commit-script-check.sh

Verification of scripted diffs.

git-subtree-check.sh

Run this script from the root of the repository to verify that a subtree matches the contents of the commit it claims to have been updated to.

To use, make sure that you have fetched the upstream repository branch in which the subtree is maintained:

Usage: git-subtree-check.sh DIR (COMMIT)

COMMIT may be omitted, in which case HEAD is used.

lint-all.sh

Calls other scripts with the lint- prefix.