oxen-core/contrib/epee/include
Jason Rhinelander 51b247bfac daemon & daemonize overhaul
This commit continues the complete replacement of the spaghetti code
mess that was inside daemon/ and daemonize/ which started in #1138, and
looked like a entry level Java programmer threw up inside the code base.
This greatly simplifies it, removing a whole pile of useless abstraction
layers that don't actually abstract anything, and results in
considerably simpler code.  (Many of the changes here were also carried
out in #1138; this commit updates them with the merged result which
amends some things from that PR and goes further in some places).

In detail:

- the `--detach` (and related `--pidfile`) options are gone.  (--detach
  is still handled, but now just prints a fatal error).  Detaching a
  process is an archaic unix mechanism that has no place on a modern
  system.  If you *really* want to do it anyway, `nohup lokid &` will do
  the job.  (The Windows service control code, which is probably seldom
  used, is kept because it seems potentially useful for Windows users).

- Many of the `t_whatever` classes in daemon/* are just deleted (mostly
  done in #1138); each one was a bunch of junk code that wraps 3-4 lines
  but forces an extra layer (not even a generic abstraction, just a
  useless wrapper) for no good reason and made the daemon code painfully
  hard to understand and work with.

- All of the remaining `t_whatever` classes in daemon/* are either
  renamed to `whatever` (because prefixing every class with `t_` is
  moronic).

- Some stupid related code (e.g. epee's command handler returning an
  unsuitable "usage" string that has to be string modified into what we
  want) was replaced with more generic, useful code.

- Replaced boost mutexes/cvs with std ones in epee command handler, and
  deleted some commented out code.

- The `--public-node` option handling was terrible: it was being handled
  in main, but main doesn't know anything about options, so then it
  forced it through the spaghetti objects *beside* the pack of all
  options that got passed along.  Moved it to a more sane location
  (core_rpc_server) and parse it out with some sanity.

- Changed a bunch of std::bind's to lambdas because, at least for small
  lambdas (i.e. with only one-or-two pointers for captures) they will
  generally be more efficient as the values can be stored in
  std::function's without any memory allocations.
2020-05-11 18:44:45 -03:00
..
net Merge commit '9a6006bad89db877ee082c7dfa01da76efd6231a' into MergeUpstream 2020-04-09 15:42:03 +10:00
serialization s/varialble/variable typos have a development cost as well 2020-04-09 12:20:39 +10:00
storages Split up huge instanciations & header fixes 2019-12-03 00:51:18 -04:00
ado_db_helper.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
console_handler.h daemon & daemonize overhaul 2020-05-11 18:44:45 -03:00
copyable_atomic.h copyable_atomic: add a ctor with initial value 2017-09-27 11:43:08 +01:00
file_io_utils.h epee.string_tools: add conversion between UTF-8 and UTF-16 2018-06-28 09:40:26 +09:00
fnv1.h wallet: wipe seed from memory where appropriate 2018-08-16 09:17:52 +00:00
global_stream_operators.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
gzip_encoding.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
hex.h Update 2019 copyright 2019-03-05 22:05:34 +01:00
hmac-md5.h moved all stuff to github 2014-03-03 22:07:58 +00:00
include_base_utils.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
int-util.h Update 2019 copyright 2019-03-05 22:05:34 +01:00
math_helper.h Replace once_a_time_seconds; send proofs faster 2019-12-26 12:29:05 -04:00
md5_l.h inline unused function (for unused-function warning) 2017-01-14 13:37:14 +03:00
md5_l.inl Removed boost/asio.hpp include from epee/string_tools.h 2017-03-18 22:05:14 -04:00
md5global.h moved all stuff to github 2014-03-03 22:07:58 +00:00
memwipe.h Don't try forward declaring is_byte_spannable 2019-11-28 02:09:58 -04:00
misc_language.h Avoid long-deprecated boost::sleep 2019-12-26 12:26:03 -04:00
misc_log_ex.h epee: misc_log_ex.h can now be used in C code 2019-09-25 14:46:53 -03:00
misc_os_dependent.h blockchain_stats: don't use gmtime_r on Windows 2018-11-21 00:50:53 +00:00
mlocker.h Don't try forward declaring is_byte_spannable 2019-11-28 02:09:58 -04:00
pragma_comp_defs.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
profile_tools.h move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
readline_buffer.h readline_buffer: fix "cursor in prompt" bug 2018-10-12 21:03:59 +00:00
reg_exp_definer.h move includes around to lessen overall load 2017-12-16 22:46:38 +00:00
reg_utils.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
rolling_median.h blockchain: keep a rolling long term block weight median 2019-05-02 09:47:01 +00:00
service_impl_base.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
sha1.h moved all stuff to github 2014-03-03 22:07:58 +00:00
sha1.inl moved all stuff to github 2014-03-03 22:07:58 +00:00
soci_helper.h year updated in license 2015-01-02 18:52:46 +02:00
span.h Align hashable data structures 2019-11-27 14:07:52 -04:00
static_initializer.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
stats.h performance_tests: better stats, and keep track of timing history 2019-01-28 15:45:37 +00:00
stats.inl performance_tests: better stats, and keep track of timing history 2019-01-28 15:45:37 +00:00
string_coding.h Removed some unused epee functions 2017-04-25 16:07:32 -04:00
string_tools.h Revert IPV6 changes and merge back in upstream 2019-04-09 17:38:57 +10:00
syncobj.h epee: Drop deprecated Boost.Thread header 2018-04-19 09:15:09 +00:00
time_helper.h year updated in license 2015-01-02 18:52:46 +02:00
tiny_ini.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
to_nonconst_iterator.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
warnings.h year updated in license 2015-01-02 18:52:46 +02:00
winobj.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00
wipeable_string.h Update 2019 copyright 2019-03-05 22:05:34 +01:00
zlib_helper.h move modified epee code to new classes, revert license 2014-07-25 18:29:08 +02:00