1
0
mirror of https://github.com/peterbourgon/runsvinit.git synced 2026-03-05 22:07:22 +01:00

Review feedback

This commit is contained in:
Peter Bourgon
2015-10-07 15:39:45 +02:00
parent 9f0d0ba5a7
commit 9ae8b38549
5 changed files with 44 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
GO?=go
SUDO?=
RM?=--rm
GO ?= go
SUDO ?=
RMCONTAINER ?= --rm
.PHONY: test clean
@@ -15,7 +15,7 @@ runsvinit: ../*.go
env GOOS=linux GOARCH=amd64 $(GO) build -o $@ github.com/peterbourgon/runsvinit
zombie: .build.uptodate
$(SUDO) docker run $(RM) -v $(shell pwd):/mount zombietest-build cc -Wall -Werror -o /mount/zombie /zombie.c
$(SUDO) docker run $(RMCONTAINER) -v $(shell pwd):/mount zombietest-build cc -Wall -Werror -o /mount/zombie /zombie.c
.build.uptodate: build/zombie.c build/Dockerfile
$(SUDO) docker build -t zombietest-build build/

View File

@@ -11,14 +11,15 @@ function zombies() {
}
function stop_rm() {
docker stop $1
docker rm $1
docker stop $1 >/dev/null
#docker logs $1
docker rm $1 >/dev/null
}
SLEEP=1
RC=0
C=$(docker run -d zombietest /runsvinit -reap=false)
C=$(docker run -d zombietest /runsvinit -reap=false -debug)
sleep $SLEEP
NOREAP=$(zombies)
echo -n without reaping, we have $NOREAP zombies...
@@ -31,7 +32,7 @@ else
fi
stop_rm $C
C=$(docker run -d zombietest /runsvinit)
C=$(docker run -d zombietest /runsvinit -debug)
sleep $SLEEP
YESREAP=$(zombies)
echo -n with reaping, we have $YESREAP zombies...