Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
252#if HAVE_DECL_FORK253if (daemon_ep.IsOpen()) {254// Signal initialization status to parent, then close pipe.255daemon_ep.TokenWrite(fRet);256daemon_ep.Close();257}258#endif259return fRet;260}262/// \anchor main263MAIN_FUNCTION264{265NodeContext node;266int exit_status;267std::unique_ptr<interfaces::Init> init = interfaces::MakeNodeInit(node, argc, argv, exit_status);268if (!init) {269return exit_status;270}272SetupEnvironment();274// Connect bitcoind signal handlers275noui_connect();277util::ThreadSetInternalName("init");279// Interpret command line arguments280ArgsManager& args = *Assert(node.args);281if (!ParseArgs(node, argc, argv)) return EXIT_FAILURE;282// Process early info return commands such as -help or -version283if (ProcessInitCommands(*init, args)) return EXIT_SUCCESS;285// Start application286if (!AppInit(node) || !Assert(node.shutdown_signal)->wait()) {287node.exit_status = EXIT_FAILURE;288}289Interrupt(node);290Shutdown(node);292return node.exit_status;293}
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.