I have two go programs. ProgA starts ProgB using cmd.Start(). From ProgA I try to kill ProgB, but ProgB should get killed immediately, it has to do some cleanup before dying. So I'm using signal.Notify in ProgB to handle sigcall.SIGKILL but whenever ProgA calls progb.Process.Kill() it doesn't seem to notify ProgB(write contents to sigc channel)

in ProgB I have the notify like this:

signal.Notify(sigc, syscall.SIGKILL)
go func() {
            fmt.Println("started listening")
            <-sigc
            fmt.Println("sig term")
            cleanUp()
            os.Exit(1)   

}()
someLongRunningCode() 

is there something I'm missing out? I'm sure that ProgA sends a SIGKILL because cmd.Process.Kill() internally does a process.Signal(SIGKILL)