Make delay before execution command in more efficient way
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
|||||||
// Spawner forks and execs given program, and also detaches form its control tty.
|
// Spawner forks and execs given program, and also detaches form its control tty.
|
||||||
func (c *MyConfig) Spawner() {
|
func (c *MyConfig) Spawner() {
|
||||||
for prg := range c.Channels.RunChan {
|
for prg := range c.Channels.RunChan {
|
||||||
<-time.After(25 * time.Millisecond)
|
time.Sleep(25 * time.Millisecond)
|
||||||
|
|
||||||
devnullR, err := os.Open(os.DevNull)
|
devnullR, err := os.Open(os.DevNull)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user