1
0
mirror of https://github.com/beego/bee.git synced 2025-07-07 16:40:19 +00:00

Update vendors

This commit is contained in:
MZI
2018-10-13 21:45:53 +08:00
parent bf5480b2df
commit db6c162b03
451 changed files with 139580 additions and 42578 deletions

View File

@ -2,10 +2,11 @@ package debugger
import (
"fmt"
sys "golang.org/x/sys/unix"
"io/ioutil"
"os"
"syscall"
sys "golang.org/x/sys/unix"
)
func attachErrorMessage(pid int, err error) error {
@ -16,7 +17,7 @@ func attachErrorMessage(pid int, err error) error {
bs, err := ioutil.ReadFile("/proc/sys/kernel/yama/ptrace_scope")
if err == nil && len(bs) >= 1 && bs[0] != '0' {
// Yama documentation: https://www.kernel.org/doc/Documentation/security/Yama.txt
return fmt.Errorf("Could not attach to pid %d: set /proc/sys/kernel/yama/ptrace_scope to 0", pid)
return fmt.Errorf("Could not attach to pid %d: this could be caused by a kernel security setting, try writing \"0\" to /proc/sys/kernel/yama/ptrace_scope", pid)
}
fi, err := os.Stat(fmt.Sprintf("/proc/%d", pid))
if err != nil {