1 // +build !windows
2 3 package pipe
4 5 import (
6 "syscall"
7 )
8 9 // Pause sends a signal to the worker process to stop
10 func (w *Worker) Pause() (e error) {
11 if e = w.Cmd.Process.Signal(syscall.SIGSTOP); !E.Chk(e) {
12 D.Ln("paused")
13 }
14 return
15 }
16 17 // Continue sends a signal to a worker process to resume work
18 func (w *Worker) Continue() (e error) {
19 if e = w.Cmd.Process.Signal(syscall.SIGCONT); !E.Chk(e) {
20 D.Ln("resumed")
21 }
22 return
23 }
24