killChild() is not needed any more; update config example by the way

This commit is contained in:
Frank Denis 2018-10-03 16:35:59 +02:00
parent a74c0fedeb
commit 9f1be6e079
5 changed files with 10 additions and 24 deletions

View File

@ -41,12 +41,7 @@ listen_addresses = ['127.0.0.1:53', '[::1]:53']
max_clients = 250
## Switch to a non-privileged system user after listening sockets have been created.
## Two processes will be running.
## The first one will keep root privileges, but is only a supervisor, that does nothing
## except create the sockets, manage the service, and restart it if it crashes.
## The second process is the service itself, and that one will always run as a different
## user.
## Switch to a different system user after listening sockets have been created.
## Note (1): this feature is currently unsupported on Windows.
## Note (2): this feature is not compatible with systemd socket activation.
@ -491,6 +486,15 @@ cache_neg_max_ttl = 600
refresh_delay = 72
prefix = ''
## Quad9 over DNSCrypt - https://quad9.net/
# [sources.quad9-resolvers]
# urls = ["https://www.quad9.net/quad9-resolvers.md"]
# minisign_key = "RWQBphd2+f6eiAqBsvDZEBXBGHQBJfeG6G+wJPPKxCZMoEQYpmoysKUN"
# cache_file = "quad9-resolvers.md"
# refresh_delay = 72
# prefix = "quad9"
## Another example source, with resolvers censoring some websites not appropriate for children
## This is a subset of the `public-resolvers` list, so enabling both is useless

View File

@ -108,7 +108,6 @@ func (app *App) Stop(service service.Service) error {
if pidFilePath := pidfile.GetPidfilePath(); len(pidFilePath) > 1 {
os.Remove(pidFilePath)
}
killChild()
dlog.Notice("Stopped.")
return nil
}

View File

@ -84,11 +84,3 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
dlog.Fatalf("Unable to reexecute [%s]", path)
os.Exit(1)
}
func killChild() {
if cmd != nil {
if err := cmd.Process.Kill(); err != nil {
dlog.Fatal("Failed to kill child process.")
}
}
}

View File

@ -86,11 +86,3 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
dlog.Fatalf("Unable to reexecute [%s]", path)
os.Exit(1)
}
func killChild() {
if cmd != nil {
if err := cmd.Process.Kill(); err != nil {
dlog.Fatal("Failed to kill child process.")
}
}
}

View File

@ -3,4 +3,3 @@ package main
import "os"
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {}
func killChild() {}