Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
425 views
in Technique[技术] by (71.8m points)

What is a Windows equivalent for SIGUSR1/2 for Go?

I'm new to porting but I'd like to give it a shot. I have a library which is built for linux and I want to see if I can make it build on Windows in a day.

A part of the problem seems to be the code:

    ch := make(chan os.Signal, 1)
    signal.Notify(ch, syscall.SIGUSR2)

What would be the simplest way to emulate this process signalling in Windows in Go?

Specifically, I'm looking into what to do with this code https://github.com/influxdata/influxdb/blob/ab87c23be6c630754787dcd9113cd86bd6afaaf1/pkg/lifecycle/resource_debug.go#L30

Could I maybe use https://godoc.org/bitbucket.org/avd/go-ipc/sync#NewEvent for this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...