I'm using Go to launch a couple of scripts and when they have some problems they use the "alert" signal, I know Go can capture those signals but I need to know the PID that originated the Signal. in C to the signal handler is passed a structure to know the pid who originated the signal but in Go looks like is not the case
package main
import (
"fmt"
"os"
"os/signal"
)
func main() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, os.Kill)
s := <-c
fmt.Println("Got signal:", s)
fmt.Printf("%+v
",s)
}
the example below (extracted from the signal doc) send me the signal who originated the call but not any useful info (like the pid)