An easier way to remove args[0]
This commit is contained in:
parent
cc327fdc48
commit
f9b6994fd2
|
@ -37,10 +37,7 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
|
||||||
dlog.Fatal(err)
|
dlog.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove arg[0]
|
args = args[1:]
|
||||||
copy(args[0:], args[0+1:])
|
|
||||||
args[len(args)-1] = ""
|
|
||||||
args = args[:len(args)-1]
|
|
||||||
args = append(args, "-child")
|
args = append(args, "-child")
|
||||||
|
|
||||||
cmd := exec.Command(path, args...)
|
cmd := exec.Command(path, args...)
|
||||||
|
|
Loading…
Reference in New Issue