mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-12 18:40:58 +00:00
Expand support for Suspend to OSX, BSD, Solaris
This commit is contained in:
parent
fd45acc910
commit
315391b0aa
2 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// +build !linux
|
||||
// +build android plan9 nacl windows
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// +build linux darwin dragonfly solaris openbsd netbsd freebsd
|
||||
package main
|
||||
|
||||
import "syscall"
|
||||
|
|
@ -19,8 +20,7 @@ func (v *View) Suspend(usePlugin bool) bool {
|
|||
|
||||
// suspend the process
|
||||
pid := syscall.Getpid()
|
||||
tid := syscall.Gettid()
|
||||
err := syscall.Tgkill(pid, tid, syscall.SIGSTOP)
|
||||
err := syscall.Kill(pid, syscall.SIGSTOP)
|
||||
if err != nil {
|
||||
TermMessage(err)
|
||||
}
|
||||
Loading…
Reference in a new issue