Now all indicator updates properly

This commit is contained in:
eleksir
2024-09-23 19:05:45 +03:00
parent 1a4ab136dc
commit 5bb259a30c
15 changed files with 228 additions and 231 deletions

View File

@@ -8,12 +8,9 @@ import (
"time"
)
// RunChan to this channel we send command and its argv to execute as separate process.
var RunChan = make(chan []string, 128)
// Spawner forks and execs given program, and also detaches form its control tty.
func (c MyConfig) Spawner() {
for prg := range RunChan {
func (c *MyConfig) Spawner() {
for prg := range c.Channels.RunChan {
devnullR, _ := os.Open(os.DevNull)
devnullW, _ := os.OpenFile(os.DevNull, os.O_WRONLY|os.O_APPEND, 0644)
@@ -48,7 +45,7 @@ func (c MyConfig) Spawner() {
}
// CleanZombies reaps processes spawned by Spawner() and already exited.
func (c MyConfig) CleanZombies() {
func (c *MyConfig) CleanZombies() {
r := syscall.Rusage{}
for {