mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: dind SIGINT and SIGCHLD changes (#771)
1) in dind, prevent SIGINT reaching to dockerd. This kills docker and prevents shutdown as fn server is trying to stop. 2) as init process, always reap child processes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -euo pipefail
|
||||
|
||||
fsdriver=$(grep -Eh -w -m1 "overlay|aufs" /proc/filesystems | cut -f2)
|
||||
if [ $fsdriver == "overlay" ]; then
|
||||
@@ -10,6 +10,8 @@ mtu=$(ip link show dev $(ip route |
|
||||
awk '$1 == "default" { print $NF }') |
|
||||
awk '{for (i = 1; i <= NF; i++) if ($i == "mtu") print $(i+1)}')
|
||||
|
||||
# activate job control, prevent docker process from receiving SIGINT
|
||||
set -m
|
||||
dockerd-entrypoint.sh --storage-driver=$fsdriver --mtu=$mtu &
|
||||
|
||||
# give docker a few seconds
|
||||
|
||||
Reference in New Issue
Block a user