9p: session ctl: remove interrupt alias, drop / prefix for commands
stop is the only out-of-band signal. Everything else is forwarded as a slash command (/ prepended automatically), so 'echo compact > ctl' works directly.
This commit is contained in:
parent
99e001f326
commit
3ff2454dcb
|
|
@ -877,13 +877,11 @@ func (s *Server) handleWrite(path, input string) {
|
|||
sess.core.Queue(input)
|
||||
|
||||
case "ctl":
|
||||
switch {
|
||||
case input == "stop" || input == "interrupt":
|
||||
switch input {
|
||||
case "stop":
|
||||
sess.core.Interrupt(agent.ErrInterrupted)
|
||||
case strings.HasPrefix(input, "/"):
|
||||
sess.core.Submit(sess.ctx, input, publish)
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "olliesrv: session ctl: unknown command %q (use stop, interrupt, or /slashcmd)\n", input)
|
||||
sess.core.Submit(sess.ctx, "/"+input, publish)
|
||||
}
|
||||
|
||||
case "backend":
|
||||
|
|
|
|||
Reference in New Issue