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 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.

@opennota

This comment has been minimized.

Copy link

@opennota opennota 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

This comment has been minimized.

Copy link
Member

@alexbrainman alexbrainman commented Oct 27, 2017

Does Windows support SIGINT?

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

Alex

@crvv

This comment has been minimized.

Copy link
Contributor

@crvv 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 added the OS-Windows label Nov 30, 2017
@bradfitz bradfitz self-assigned this Nov 30, 2017
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 30, 2017

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

@gopherbot gopherbot closed this in 871b793 Dec 2, 2017
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.