Discover Packages
github.com/k1LoW/exec
package
module
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: May 30, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 11
Opens a new window with list of known importers.
README
README
¶
exec
Usage
import (
// "os/exec"
"github.com/k1LoW/exec"
)
Difference between os/exec
and k1LoW/exec
k1LoW/exec.Command
returns *os/exec.Cmd
with PGID set.
When context cancelled, k1LoW/exec.CommandContext
send signal to process group.
References
Songmu/timeout : Timeout invocation. Go porting of GNU timeout and able to use as Go package
Expand ▾
Collapse ▴
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Command returns *os/exec.Cmd with Setpgid = true
CommandContext returns *os/exec.Cmd with Setpgid = true
When ctx cancelled, `github.com/k1LoW/exec.CommandContext` send signal to process group
KillCommand send syscall.SIGKILL to cmd.Process.Pid process group
KillCommand send taskkill to cmd.Process.Pid ( if runtime.GOOS == 'windows' )
LookPath is os/exec.LookPath
TerminateCommand send signal to cmd.Process.Pid process group ( if runtime.GOOS != 'windows' )
TerminateCommand send taskkill to cmd.Process.Pid ( if runtime.GOOS == 'windows' )
Exec represents an command executer
CommandContext returns *os/exec.Cmd with Setpgid = true
When ctx cancelled, `github.com/k1LoW/exec.CommandContext` send signal to process group
Source Files
¶
Click to show internal directories.
Click to hide internal directories.