summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
8b892c6)
A signal is the normal stop of the daemon and of the terminal client, so
both exit with status 0 and print no error after Ctrl-C or SIGTERM. The
other commands still report a canceled context, because a signal there
stops an operation before it is done.
Issue:
5daf23e
if err != nil {
return err
}
if err != nil {
return err
}
+ // A signal is the normal stop of the daemon and the client, so their
+ // result does not include ctx.Err().
case len(args) == 1 && args[0] == "daemon":
case len(args) == 1 && args[0] == "daemon":
- err := daemon(ctx, os.Stdout)
- if err != nil {
- return err
- }
+ return daemon(ctx, os.Stdout)
case len(args) == 1 && args[0] == "chat":
case len(args) == 1 && args[0] == "chat":
- err := chat(ctx, os.Stdin, os.Stdout)
- if err != nil {
- return err
- }
+ return chat(ctx, os.Stdin, os.Stdout)
case len(args) > 0 && args[0] == "probe":
err := probe(ctx, args[1:], os.Stdout)
if err != nil {
case len(args) > 0 && args[0] == "probe":
err := probe(ctx, args[1:], os.Stdout)
if err != nil {