mirror of https://github.com/etcd-io/dbtester.git
syscall.Kill
This commit is contained in:
parent
f1b19bd041
commit
4b2d090ad1
|
|
@ -384,7 +384,9 @@ func (t *transporterServer) Transfer(ctx context.Context, r *Request) (*Response
|
|||
return nil, fmt.Errorf("nil command")
|
||||
}
|
||||
log.Printf("Stopping %s [PID: %d]", t.req.Database, t.pid)
|
||||
ps.Kill(os.Stdout, false, ps.Process{Stat: ps.Stat{Pid: int64(t.pid)}})
|
||||
if err := syscall.Kill(t.pid, syscall.SIGTERM); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if t.logfile != nil {
|
||||
t.logfile.Close()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ func CommandFunc(cmd *cobra.Command, args []string) {
|
|||
nreq.ZookeeperMyID = uint32(i + 1)
|
||||
ep := globalFlags.AgentEndpoints[nreq.EtcdServerIndex]
|
||||
|
||||
log.Printf("[%s] %s to %s\n", req.Operation, req.Database, ep)
|
||||
log.Printf("[%s] %s at %s\n", req.Operation, req.Database, ep)
|
||||
conn, err := grpc.Dial(ep, grpc.WithInsecure())
|
||||
if err != nil {
|
||||
log.Printf("error %v when connecting to %s\n", err, ep)
|
||||
|
|
|
|||
Loading…
Reference in New Issue