Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: misleading document #22454

Closed
bronze1man opened this issue Oct 26, 2017 · 4 comments
Closed

os: misleading document #22454

bronze1man opened this issue Oct 26, 2017 · 4 comments

Comments

@bronze1man
Copy link
Contributor

bronze1man commented Oct 26, 2017

What did you do?

review code in https://github.com/golang/go/blob/master/src/os/exec_posix.go#L13
https://github.com/golang/go/blob/master/src/os/exec_windows.go#L71

What did you expect to see?

os.Interrupt can not send in windows system. it will return a error message with "not supported by windows"

What did you see instead?

// The only signal values guaranteed to be present on all systems
// are Interrupt (send the process an interrupt) and Kill (force
// the process to exit).

os.Process.Signal says:

// Signal sends a signal to the Process.
// Sending Interrupt on Windows is not implemented.

os.Process.Signal says about this,but it was not on the os.Interrupt which misleading me to think that os.Process.Signal(os.Interrupt) is working on windows.

@ghost
Copy link

ghost commented Oct 27, 2017

There's a TODO: // TODO(rsc): Handle Interrupt too?

Does Windows support SIGINT?

/cc @rsc

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Oct 27, 2017
@alexbrainman
Copy link
Member

Does Windows support SIGINT?

I searched this issue list for SIGINT and I find #7479 and #17608 that probably relate to this.

Alex

@crvv
Copy link
Contributor

crvv commented Oct 27, 2017

I don't think the document is misleading.

// The only signal values guaranteed to be present on all systems
// are Interrupt ......

So Windows does support SIGINT.

// Sending Interrupt on Windows is not implemented.

Go doesn't support sending SIGINT on Windows.
It hasn't been implemented yet, and it may be supported in the future.

@bradfitz bradfitz self-assigned this Nov 30, 2017
@gopherbot
Copy link

Change https://golang.org/cl/81035 mentions this issue: os: clarify docs on Interrupt and Kill

@golang golang locked and limited conversation to collaborators Dec 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants