Browse Source

test: branch for fix of ci (#4266)

* test:

- testing replacing syscall with os.FindProces

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* address pr comments
pull/4268/head
Marko 5 years ago
committed by GitHub
parent
commit
a18380901f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      cmd/tendermint/commands/debug/kill.go

+ 5
- 1
cmd/tendermint/commands/debug/kill.go View File

@ -121,7 +121,11 @@ func killProc(pid uint64, dir string) error {
go func() { go func() {
// Killing the Tendermint process with the '-ABRT|-6' signal will result in // Killing the Tendermint process with the '-ABRT|-6' signal will result in
// a goroutine stacktrace. // a goroutine stacktrace.
if err := syscall.Kill(int(pid), syscall.SIGABRT); err != nil {
p, err := os.FindProcess(os.Getpid())
if err != nil {
fmt.Fprintf(os.Stderr, "failed to find PID to kill Tendermint process: %s", err)
}
if err = p.Signal(syscall.SIGABRT); err != nil {
fmt.Fprintf(os.Stderr, "failed to kill Tendermint process: %s", err) fmt.Fprintf(os.Stderr, "failed to kill Tendermint process: %s", err)
} }


Loading…
Cancel
Save