X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rpc%2Fconn.go;h=9fbb9c47996d44516e781f6f6bc914cbba2f8319;hb=37d75eb672f05d758a5e8fb82e32dfd50e7416dd;hp=03b748545f12c1c588acb24bac2761e0b439b25c;hpb=9d0d090fc1d683accc8bd1b354425c23cbe9fb6a;p=safcm%2Fsafcm.git diff --git a/rpc/conn.go b/rpc/conn.go index 03b7485..9fbb9c4 100644 --- a/rpc/conn.go +++ b/rpc/conn.go @@ -1,6 +1,6 @@ // Simple RPC-like protocol: implementation of connection and basic actions -// Copyright (C) 2021 Simon Ruderich +// Copyright (C) 2021-2023 Simon Ruderich // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ package rpc import ( "bufio" "fmt" + "io/fs" "os/exec" "strings" "sync" @@ -36,6 +37,8 @@ type Conn struct { sshRemote string sshOpts []string + remoteHelpers fs.FS + cmd *exec.Cmd conn *safcm.GobConn } @@ -137,7 +140,7 @@ func (c *Conn) Kill() error { c.debugf("Kill: killing connection") - c.cmd.Process.Kill() + c.cmd.Process.Kill() //nolint:errcheck return c.wait() }