proc/native: disable async preemption on freebsd
This commit is contained in:
parent
ae846a51f2
commit
c534677ece
@ -306,7 +306,7 @@ func (dbp *nativeProcess) initialize(path string, debugInfoDirs []string) (*proc
|
||||
Path: path,
|
||||
DebugInfoDirs: debugInfoDirs,
|
||||
WriteBreakpoint: dbp.writeBreakpoint,
|
||||
DisableAsyncPreempt: runtime.GOOS == "windows",
|
||||
DisableAsyncPreempt: runtime.GOOS == "windows" || runtime.GOOS == "freebsd",
|
||||
StopReason: stopReason})
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,7 @@ func Launch(cmd []string, wd string, foreground bool, debugInfoDirs []string, tt
|
||||
process.Stdout = os.Stdout
|
||||
process.Stderr = os.Stderr
|
||||
process.SysProcAttr = &syscall.SysProcAttr{Ptrace: true, Setpgid: true, Foreground: foreground}
|
||||
process.Env = proc.DisableAsyncPreemptEnv()
|
||||
if foreground {
|
||||
signal.Ignore(syscall.SIGTTOU, syscall.SIGTTIN)
|
||||
process.Stdin = os.Stdin
|
||||
|
Loading…
Reference in New Issue
Block a user