cmdKit

package
v2.2.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(name string, args ...string) ([]byte, error)

Execute 执行命令(会阻塞直到命令结束)

!!!: (1) exec.Cmd结构体执行时,会处理路径中的空格(e.g. java可执行文件的绝对路径、-Djava.ext.dirs=的路径...) (2) 假如自行处理命令行中的路径,反而会导致: 命令执行失败

func ExecuteToString

func ExecuteToString(name string, args ...string) (string, error)

ExecuteToString 执行命令(会阻塞直到命令结束)

func NewCommand

func NewCommand(setpgid bool, deathSig syscall.Signal, name string, args ...string) *exec.Cmd

NewCommand

Golang SysProcAttr.Pdeathsig方法代码示例 https://vimsky.com/examples/detail/golang-ex-syscall-SysProcAttr-Pdeathsig-method.html

@param setpgid @param deathSig

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL