[go] fix SIGUSR1 signal incompatible windows bug.

1,027 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Mar 8, 2022, 3:45:45 AM3/8/22
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot has uploaded this change for review.

View Change

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.

Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Idf358b835c7146ae1142c7e06c56212a19ee2a89
Gerrit-Change-Number: 390695
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-MessageType: newchange

Gopher Robot (Gerrit)

unread,
Mar 8, 2022, 3:46:50 AM3/8/22
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

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.

View Change

    To view, visit change 390695. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Idf358b835c7146ae1142c7e06c56212a19ee2a89
    Gerrit-Change-Number: 390695
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Comment-Date: Tue, 08 Mar 2022 08:46:47 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    mzh (Gerrit)

    unread,
    Mar 8, 2022, 4:52:07 AM3/8/22
    to Gerrit Bot, goph...@pubsubhelper.golang.org, mzh, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, Gopher Robot, golang-co...@googlegroups.com

    Attention is currently required from: Tobias Klauser, Brad Fitzpatrick, Ian Lance Taylor.

    View Change

    3 comments:

    To view, visit change 390695. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Idf358b835c7146ae1142c7e06c56212a19ee2a89
    Gerrit-Change-Number: 390695
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: mzh <m...@golangcn.org>
    Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Comment-Date: Tue, 08 Mar 2022 09:52:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Gopher Robot (Gerrit)

    unread,
    Feb 13, 2025, 5:11:20 PMFeb 13
    to Gerrit Bot, goph...@pubsubhelper.golang.org, Meng Zhuo, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, golang-co...@googlegroups.com

    Gopher Robot abandoned this change

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: abandon
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Idf358b835c7146ae1142c7e06c56212a19ee2a89
    Gerrit-Change-Number: 390695
    Gerrit-PatchSet: 1
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-CC: Meng Zhuo <mengzh...@gmail.com>
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages