hauleth / erlang-systemd

systemd utilities for Erlang applications
Apache License 2.0
174 stars 19 forks source link

Use `socket` instead of `gen_udp` #20

Closed hauleth closed 4 years ago

hauleth commented 4 years ago

This change adds support for sending file descriptors to the systemd, to keep them open between application restarts.

I haven't tested it fully yet, but unfortunately this feature will not fully work right now as Erlang do not allow for "leaking" the opened sockets when controlling process dies (and at the same time - when the VM dies).

codecov[bot] commented 4 years ago

Codecov Report

Merging #20 into master will decrease coverage by 0.44%. The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   95.71%   95.27%   -0.45%     
==========================================
  Files           8        8              
  Lines         280      296      +16     
==========================================
+ Hits          268      282      +14     
- Misses         12       14       +2     
Impacted Files Coverage Δ
src/systemd_sup.erl 96.87% <50.00%> (ø)
src/systemd_socket.erl 86.36% <87.50%> (-3.64%) :arrow_down:
src/systemd.erl 93.22% <100.00%> (+0.76%) :arrow_up:
src/systemd_journal_h.erl 96.36% <100.00%> (+0.03%) :arrow_up:
src/systemd_kmsg_formatter.erl 100.00% <100.00%> (ø)
src/systemd_watchdog.erl 94.73% <100.00%> (-0.92%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cd1b697...0e782a6. Read the comment docs.