Gerrit Bot has uploaded this change for review.
fix SIGUSR1 signal incompatible windows bug.
xxx.go:64:3: undefined: syscall.SIGUSR1
xxx.go:65:3: undefined: syscall.SIGUSR2
xxx.go:68:3: undefined: syscall.SIGTSTP
xxx.go:111:5: undefined: syscall.SIGUSR1
xxx.go:112:5: undefined: syscall.SIGUSR2
xxx.go:115:5: undefined: syscall.SIGTSTP
xxx.go:119:5: undefined: syscall.SIGUSR1
xxx.go:120:5: undefined: syscall.SIGUSR2
xxx.go:123:5: undefined: syscall.SIGTSTP
xxx.go:224:3: undefined: syscall.Kill
xxx.go:224:3: too many errors
after fixing, it can be compiled normally
The items in question are: https://github.com/fvbock/endless/issues/30
This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.
**Please ensure you adhere to every item in this list.**
More info can be found at https://github.com/golang/go/wiki/CommitMessage
+ The PR title is formatted as follows: `net/http: frob the quux before blarfing`
+ The package name goes before the colon
+ The part after the colon uses the verb tense + phrase that completes the blank in,
"This change modifies Go to ___________"
+ Lowercase verb after the colon
+ No trailing period
+ Keep the title as short as possible. ideally under 76 characters or shorter
+ No Markdown
+ The first PR comment (this one) is wrapped at 76 characters, unless it's
really needed (ASCII art, table, or long link)
+ If there is a corresponding issue, add either `Fixes #1234` or `Updates #1234`
(the latter if this is not a complete fix) to this comment
+ If referring to a repo other than `golang/go` you can use the
`owner/repo#issue_number` syntax: `Fixes golang/tools#1234`
+ We do not use Signed-off-by lines in Go. Please don't add them.
Our Gerrit server & GitHub bots enforce CLA compliance instead.
+ Delete these instructions once you have read and applied them
Change-Id: Idf358b835c7146ae1142c7e06c56212a19ee2a89
GitHub-Last-Rev: 1a70eff904944dde32213a27d3357c7380067fd0
GitHub-Pull-Request: golang/go#51541
---
M src/syscall/types_windows.go
1 file changed, 69 insertions(+), 0 deletions(-)
diff --git a/src/syscall/types_windows.go b/src/syscall/types_windows.go
index 384b5b4..a8a06d8 100644
--- a/src/syscall/types_windows.go
+++ b/src/syscall/types_windows.go
@@ -80,8 +80,24 @@
13: "broken pipe",
14: "alarm clock",
15: "terminated",
+ /* compatible with windows */
+ 16: "SIGUSR1",
+ 17: "SIGUSR2",
+ 18: "SIGTSTP",
+ /* compatible with windows */
}
+/* compatible with windows */
+func Kill(...interface{}) error {
+ return nil;
+}
+const (
+ SIGUSR1 = Signal(16)
+ SIGUSR2 = Signal(17)
+ SIGTSTP = Signal(18)
+)
+/* compatible with windows */
+
const (
GENERIC_READ = 0x80000000
GENERIC_WRITE = 0x40000000
To view, visit change 390695. To unsubscribe, or for help writing mail filters, visit settings.
Congratulations on opening your first change. Thank you for your contribution!
Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.
Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.
During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.
Attention is currently required from: Tobias Klauser, Brad Fitzpatrick, Ian Lance Taylor.
3 comments:
Commit Message:
Patch Set #1, Line 7: fix SIGUSR1 signal incompatible windows bug.
syscall: add SIGUSR{1,2,TSTP} for windows
Drop these comments then put why we needs this CL
FYI: https://github.com/golang/go/wiki/CommitMessage
A proposal issue is required, since it adds exported constants.
File src/syscall/types_windows.go:
I'm no expert on Windows but I concern the signal ids are inconsistent with other existed librarys or docs:
minGW: no SIGUSR1,2,TSTP (https://github.com/mirror/mingw-w64/blob/c6e13e0c105eab7797c2373819b49fff6b05566c/mingw-w64-headers/crt/signal.h)
Linux(x86,arm): SIGUSR1(10),SIGUSR2(12),SIGTSTP(20) (ref: https://man7.org/linux/man-pages/man7/signal.7.html)
Further more, the signals above shows we had already defined `user defined signal 1`
To view, visit change 390695. To unsubscribe, or for help writing mail filters, visit settings.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |