mirror of
https://github.com/golang/go
synced 2024-10-04 01:21:21 -06:00
exp/ssh: export type signal. Renamed to Signal
R=dave, agl, rsc, golang-dev, n13m3y3r CC=golang-dev https://golang.org/cl/5450059
This commit is contained in:
parent
c52b7db470
commit
fad57c0c03
@ -15,23 +15,23 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
type signal string
|
type Signal string
|
||||||
|
|
||||||
// POSIX signals as listed in RFC 4254 Section 6.10.
|
// POSIX signals as listed in RFC 4254 Section 6.10.
|
||||||
const (
|
const (
|
||||||
SIGABRT signal = "ABRT"
|
SIGABRT Signal = "ABRT"
|
||||||
SIGALRM signal = "ALRM"
|
SIGALRM Signal = "ALRM"
|
||||||
SIGFPE signal = "FPE"
|
SIGFPE Signal = "FPE"
|
||||||
SIGHUP signal = "HUP"
|
SIGHUP Signal = "HUP"
|
||||||
SIGILL signal = "ILL"
|
SIGILL Signal = "ILL"
|
||||||
SIGINT signal = "INT"
|
SIGINT Signal = "INT"
|
||||||
SIGKILL signal = "KILL"
|
SIGKILL Signal = "KILL"
|
||||||
SIGPIPE signal = "PIPE"
|
SIGPIPE Signal = "PIPE"
|
||||||
SIGQUIT signal = "QUIT"
|
SIGQUIT Signal = "QUIT"
|
||||||
SIGSEGV signal = "SEGV"
|
SIGSEGV Signal = "SEGV"
|
||||||
SIGTERM signal = "TERM"
|
SIGTERM Signal = "TERM"
|
||||||
SIGUSR1 signal = "USR1"
|
SIGUSR1 Signal = "USR1"
|
||||||
SIGUSR2 signal = "USR2"
|
SIGUSR2 Signal = "USR2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Session represents a connection to a remote command or shell.
|
// A Session represents a connection to a remote command or shell.
|
||||||
@ -130,7 +130,7 @@ type signalMsg struct {
|
|||||||
|
|
||||||
// Signal sends the given signal to the remote process.
|
// Signal sends the given signal to the remote process.
|
||||||
// sig is one of the SIG* constants.
|
// sig is one of the SIG* constants.
|
||||||
func (s *Session) Signal(sig signal) error {
|
func (s *Session) Signal(sig Signal) error {
|
||||||
req := signalMsg{
|
req := signalMsg{
|
||||||
PeersId: s.peersId,
|
PeersId: s.peersId,
|
||||||
Request: "signal",
|
Request: "signal",
|
||||||
|
Loading…
Reference in New Issue
Block a user