summaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-02-13 13:38:45 -0600
committerSean E. Russell <ser@ser1.net>2020-02-13 13:38:45 -0600
commit1bf6926282cf1c5a364eb459b541bee1c24a9cd0 (patch)
tree474f48c37d5b45a5536be5179f34be758d3910a8 /widgets
parent4247e9339e46bb123f714e7774547e6af6a10ec8 (diff)
parent7ff732e06ef17a9324bc3eb86e44bb0f31c2c734 (diff)
Merge remote-tracking branch 'jrswab/otherSigTerms'
Diffstat (limited to 'widgets')
-rw-r--r--widgets/help.go6
-rw-r--r--widgets/proc.go7
2 files changed, 8 insertions, 5 deletions
diff --git a/widgets/help.go b/widgets/help.go
index 54ddfbc..953de45 100644
--- a/widgets/help.go
+++ b/widgets/help.go
@@ -22,7 +22,9 @@ Process navigation
Process actions:
- <Tab>: toggle process grouping
- - dd: kill selected process or group of processes
+ - dd: kill selected process or group of processes with SIGTERM (15)
+ - d3: kill selected process or group of processes with SIGQUIT (3)
+ - d9: kill selected process or group of processes with SIGKILL (9)
Process sorting
- c: CPU
@@ -50,7 +52,7 @@ func (self *HelpMenu) Resize(termWidth, termHeight int) {
textWidth = maxInt(len(line), textWidth)
}
textWidth += 2
- textHeight := 22
+ textHeight := 28
x := (termWidth - textWidth) / 2
y := (termHeight - textHeight) / 2
diff --git a/widgets/proc.go b/widgets/proc.go
index 29ad19c..03f1de9 100644
--- a/widgets/proc.go
+++ b/widgets/proc.go
@@ -182,14 +182,15 @@ func (self *ProcWidget) ToggleShowingGroupedProcs() {
self.convertProcsToTableRows()
}
-// KillProc kills a process or group of processes depending on if we're displaying the processes grouped or not.
-func (self *ProcWidget) KillProc() {
+// KillProc kills a process or group of processes depending on if we're
+// displaying the processes grouped or not.
+func (self *ProcWidget) KillProc(sigName string) {
self.SelectedItem = ""
command := "kill"
if self.UniqueCol == 1 {
command = "pkill"
}
- cmd := exec.Command(command, self.Rows[self.SelectedRow][self.UniqueCol])
+ cmd := exec.Command(command, "--signal", sigName, self.Rows[self.SelectedRow][self.UniqueCol])
cmd.Start()
cmd.Wait()
}