added generic user lookup and foreground processes

This commit is contained in:
ston1th 2017-04-19 23:20:52 +02:00
commit 1e230617ce
7 changed files with 134 additions and 50 deletions

View file

@ -11,8 +11,9 @@ import (
func main() {
cfg := godrop.Config{
User: "nobody",
Group: "nobody",
User: "nobody",
Group: "nobody",
Foreground: true,
}
err := godrop.Drop(cfg, func() (net.Listener, error) { return net.Listen("tcp", ":80") })
if err != nil {