| 1155 | } |
| 1156 | |
| 1157 | bool AppInitSanityChecks() |
| 1158 | { |
| 1159 | // ********************************************************* Step 4: sanity checks |
| 1160 | |
| 1161 | init::SetGlobals(); |
| 1162 | |
| 1163 | if (!init::SanityChecks()) { |
| 1164 | return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), PACKAGE_NAME)); |
| 1165 | } |
| 1166 | |
| 1167 | // Probe the data directory lock to give an early error message, if possible |
| 1168 | // We cannot hold the data directory lock here, as the forking for daemon() hasn't yet happened, |
| 1169 | // and a fork will cause weird behavior to it. |
| 1170 | return LockDataDirectory(true); |
| 1171 | } |
| 1172 | |
| 1173 | bool AppInitLockDataDirectory() |
| 1174 | { |
no test coverage detected