- 352283739438E0D213F66B3D94A728ECF280ACE2280615A2C700E5D94BF32BBD3518F512FAB55F7071FF5E8F02EC988CC1BE71EC15597AF3C3933D7CB833EFC4
+ 5580D0FA04B103FDDFF3B029385134345CE8F1968688E4D69FC4BD0EF13F87BE7A380476829FB761B82AD0069D003948B5FCFF7470941AB8298DF82E93C9B80A
bitcoin/src/init.cpp
(25 . 10)(25 . 6)
100
101 void ExitTimeout(void* parg)
102 {
103 #ifdef WIN32
104 Sleep(5000);
105 ExitProcess(0);
106 #endif
107 }
108
109 void Shutdown(void* parg)
(113 . 19)(109 . 8)
111
112 bool AppInit2(int argc, char* argv[])
113 {
114 #ifdef _MSC_VER
115 // Turn off microsoft heap dump noise
116 _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
117 _CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0));
118 #endif
119 #if _MSC_VER >= 1400
120 // Disable confusing "helpful" text message on abort, ctrl-c
121 _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
122 #endif
123 #ifndef WIN32
124 umask(077);
125 #endif
126 #ifndef WIN32
127
128 // Clean shutdown on SIGTERM
129 struct sigaction sa;
130 sa.sa_handler = HandleSIGTERM;
(134 . 7)(119 . 6)
132 sigaction(SIGTERM, &sa, NULL);
133 sigaction(SIGINT, &sa, NULL);
134 sigaction(SIGHUP, &sa, NULL);
135 #endif
136
137 //
138 // Parameters
(189 . 16)(173 . 11)
140 " -maxreceivebuffer=<n>\t " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)\n") +
141 " -maxsendbuffer=<n>\t " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)\n") +
142 " -paytxfee=<amt> \t " + _("Fee per kB to add to transactions you send\n") +
143 #if !defined(WIN32)
144 " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") +
145 #endif
146 " -testnet \t\t " + _("Use the test network\n") +
147 " -debug \t\t " + _("Output extra debugging information\n") +
148 " -logtimestamps \t " + _("Prepend debug output with timestamp\n") +
149 " -printtoconsole \t " + _("Send trace/debug info to console instead of debug.log file\n") +
150 #ifdef WIN32
151 " -printtodebugger \t " + _("Send trace/debug info to debugger\n") +
152 #endif
153 " -rpcuser=<user> \t " + _("Username for JSON-RPC connections\n") +
154 " -rpcpassword=<pw>\t " + _("Password for JSON-RPC connections\n") +
155 " -rpcport=<port> \t\t " + _("Listen for JSON-RPC connections on <port> (default: 8332)\n") +
(218 . 12)(197 . 7)
157
158 fTestNet = GetBoolArg("-testnet");
159 fDebug = GetBoolArg("-debug");
160
161 #if !defined(WIN32)
162 fDaemon = GetBoolArg("-daemon");
163 #else
164 fDaemon = false;
165 #endif
166
167 if (fDaemon)
168 fServer = true;
(246 . 7)(220 . 6)
170 exit(ret);
171 }
172
173 #if !defined(WIN32)
174 if (fDaemon)
175 {
176 // Daemonize
(266 . 7)(239 . 6)
178 if (sid < 0)
179 fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno);
180 }
181 #endif
182
183 if (!fDebug && !pszSetDataDir[0])
184 ShrinkDebugFile();