Posted on 2013-08-08 09:07
oathleo 阅读(288)
评论(0) 编辑 收藏 所属分类:
Golang
exec卡住了,阻塞调用肯定卡住了
调用Start
func (*Cmd) Run
func (c *Cmd) Run() error
Run starts the specified command and waits for it to complete.
The returned error is nil if the command runs, has no problems copying stdin, stdout, and stderr, and exits with a zero exit status.
If the command fails to run or doesn't complete successfully, the error is of type *ExitError. Other error types may be returned for I/O problems.
func (*Cmd) Start
func (c *Cmd) Start() error
Start starts the specified command but does not wait for it to complete.