mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-07-03 03:07:29 +08:00
Reviewed-on: https://gitea.com/gitea/runner/pulls/1055 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: bircni <bircni@icloud.com>
24 lines
468 B
Go
24 lines
468 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
//go:build !windows && !plan9
|
|
|
|
package process
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestSysProcAttrUnixModes(t *testing.T) {
|
|
plain := SysProcAttr("", false)
|
|
require.True(t, plain.Setpgid)
|
|
require.False(t, plain.Setsid)
|
|
|
|
tty := SysProcAttr("", true)
|
|
require.True(t, tty.Setsid)
|
|
require.True(t, tty.Setctty)
|
|
require.False(t, tty.Setpgid)
|
|
}
|