1 // +build linux darwin dragonfly solaris openbsd netbsd freebsd
7 // Suspend sends micro to the background. This is the same as pressing CtrlZ in most unix programs.
8 // This only works on linux and has no default binding.
9 // This code was adapted from the suspend code in nsf/godit
10 func (v *View) Suspend(usePlugin bool) bool {
11 if usePlugin && !PreActionCall("Suspend", v) {
15 screenWasNil := screen == nil
22 // suspend the process
23 pid := syscall.Getpid()
24 err := syscall.Kill(pid, syscall.SIGSTOP)
34 return PostActionCall("Suspend", v)