added generic user lookup and foreground processes
This commit is contained in:
parent
4b88a07ef5
commit
1e230617ce
7 changed files with 134 additions and 50 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ import (
|
|||
|
||||
func main() {
|
||||
cfg := godrop.Config{
|
||||
User: "nobody",
|
||||
Group: "nobody",
|
||||
User: "nobody",
|
||||
Group: "nobody",
|
||||
Foreground: true,
|
||||
}
|
||||
err := godrop.MultiDrop(cfg, func() ([]net.Listener, error) {
|
||||
l1, err := net.Listen("tcp", ":80")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue