Skip to content
Permalink
Browse files

Merge #185

185: fix docker shutdown r=disassembler a=cleverca22



Co-authored-by: Michael Bishop <cleverca22@gmail.com>
  • Loading branch information
iohk-bors and cleverca22 committed Dec 2, 2019
2 parents 6b3e817 + a6ee5a3 commit 7e05be23892c27a9143d9c53fa85cb5a94680672
Showing with 33 additions and 0 deletions.
  1. +5 −0 docker/default.nix
  2. +28 −0 docker/runit.patch
@@ -217,6 +217,10 @@ let
chmod u+x /etc/runit/stopit
kill -cont 1
'';
ctrlaltdel = mkScript "/etc/runit/" "ctrlaltdel" ''
#!${stdenv.shell}
chmod u+x /etc/runit/stopit
'';

one = mkScript "/etc/runit/" "1" ''
mkdir /root /tmp
@@ -402,6 +406,7 @@ let
one
two
three
ctrlaltdel
#(wrapService "prometheus-blackbox-exporter")
#(wrapService "prometheus-node-exporter")
#sleeper
@@ -59,3 +59,31 @@ diff -ru admin-orig/runit-2.1.2/src/runit.c admin/runit-2.1.2/src/runit.c
for (;;) sig_pause();
/* not reached */
Only in admin/runit-2.1.2/src: .runit.c.swp
diff -ur runit-2.1.2-old/src/runit.c runit-2.1.2/src/runit.c
--- runit-2.1.2-old/src/runit.c 2019-12-02 18:36:02.982346238 -0400
+++ runit-2.1.2/src/runit.c 2019-12-02 18:46:24.483615039 -0400
@@ -66,6 +66,7 @@
sig_block(sig_hangup);
sig_block(sig_int);
sig_catch(sig_int, sig_int_handler);
+ sig_catch(sig_term, sig_int_handler);
sig_block(sig_pipe);
sig_block(sig_term);

@@ -145,6 +146,7 @@
sig_unblock(sig_child);
sig_unblock(sig_cont);
sig_unblock(sig_int);
+ sig_unblock(sig_term);
#ifdef IOPAUSE_POLL
poll(&x, 1, 14000);
#else
@@ -156,6 +158,7 @@
sig_block(sig_cont);
sig_block(sig_child);
sig_block(sig_int);
+ sig_block(sig_term);

while (read(selfpipe[0], &ch, 1) == 1) {}
while ((child =wait_nohang(&wstat)) > 0)
Only in runit-2.1.2-old/src: .runit.c.swp

0 comments on commit 7e05be2

Please sign in to comment.
You can’t perform that action at this time.