SIGCONT not detected on channel

I am trying to replicate a shell environment. The following code works within os.StartProcess

and p.Wait()

. It can accept C-z

(SIGTSTP) and C-c

(SIGINT), but not when I send SIGCONT

from another shell using kill -CONT [PID]

.

sigChild := make(chan os.Signal)
defer close(sigChild)
signal.Notify(sigChild, syscall.SIGTSTP, syscall.SIGINT, syscall.SIGCONT)
defer signal.Stop(sigChild)

sigRcvd := <- sigChild
fmt.Println(sigRcvd)

      

I'm not sure if I'm missing something in my code.

+3


source to share


1 answer


This is a known issue in Go. There is a GitHub issue for it .



0


source







All Articles