mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 12:01:35 +08:00
migrate to go.sys subrepository
As of go version 1.4 the standard library syscall package is "locked down" and code outside of the standard library is recommended to migrate to the go.sys subrepository. Reference: https://golang.org/s/go1.4-syscall
This commit is contained in:
committed by
Hashrocket Workstation
parent
0d08380555
commit
58de1f7c85
@ -2,12 +2,12 @@ package cli
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
sys "golang.org/x/sys/unix"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/derekparker/delve/command"
|
||||
"github.com/derekparker/delve/goreadline"
|
||||
@ -49,7 +49,7 @@ func Run(run bool, pid int, args []string) {
|
||||
}
|
||||
|
||||
ch := make(chan os.Signal)
|
||||
signal.Notify(ch, syscall.SIGINT)
|
||||
signal.Notify(ch, sys.SIGINT)
|
||||
go func() {
|
||||
for _ = range ch {
|
||||
if dbp.Running() {
|
||||
@ -105,7 +105,7 @@ func handleExit(dbp *proctl.DebuggedProcess, status int) {
|
||||
}
|
||||
|
||||
fmt.Println("Detaching from process...")
|
||||
err := syscall.PtraceDetach(dbp.Process.Pid)
|
||||
err := sys.PtraceDetach(dbp.Process.Pid)
|
||||
if err != nil {
|
||||
die(2, "Could not detach", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user