From 16f1f8b71d7dd0f7e972bc5705c0d68941f49218 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 5 Oct 2018 00:48:17 +0200 Subject: [PATCH] If syscall.Exec() fails, print why --- dnscrypt-proxy/privilege_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnscrypt-proxy/privilege_linux.go b/dnscrypt-proxy/privilege_linux.go index 2340a403..34ea1574 100644 --- a/dnscrypt-proxy/privilege_linux.go +++ b/dnscrypt-proxy/privilege_linux.go @@ -85,7 +85,7 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) { dlog.Fatal("Unable to reassign descriptor") } } - syscall.Exec(path, args, os.Environ()) - dlog.Fatalf("Unable to reexecute [%s]", path) + err := syscall.Exec(path, args, os.Environ()) + dlog.Fatalf("Unable to reexecute [%s]: [%s]", path, err) os.Exit(1) }