go exec_unix_test 源码

  • 2022-07-15
  • 浏览 (844)

golang exec_unix_test 代码

文件路径:/src/os/exec_unix_test.go

// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build unix

package os_test

import (
	"internal/testenv"
	. "os"
	"testing"
)

func TestErrProcessDone(t *testing.T) {
	testenv.MustHaveGoBuild(t)
	path, err := testenv.GoTool()
	if err != nil {
		t.Errorf("finding go tool: %v", err)
	}
	p, err := StartProcess(path, []string{"go"}, &ProcAttr{})
	if err != nil {
		t.Errorf("starting test process: %v", err)
	}
	p.Wait()
	if got := p.Signal(Kill); got != ErrProcessDone {
		t.Errorf("got %v want %v", got, ErrProcessDone)
	}
}

相关信息

go 源码目录

相关文章

go dir 源码

go dir_darwin 源码

go dir_plan9 源码

go dir_unix 源码

go dir_windows 源码

go dirent_aix 源码

go dirent_dragonfly 源码

go dirent_freebsd 源码

go dirent_js 源码

go dirent_linux 源码

0  赞