Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit30b1025

Browse files
committed
exec.go
1 parent6a406d3 commit30b1025

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎agent/agentexec/exec.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ func CommandContext(ctx context.Context, cmd string, args ...string) (*exec.Cmd,
3434
returnexec.CommandContext(ctx,cmd,args...),nil
3535
}
3636

37+
// PTYCommandContext returns an pty.Cmd that calls "coder agent-exec" prior to exec'ing
38+
// the provided command if CODER_PROC_PRIO_MGMT is set, otherwise a normal pty.Cmd
39+
// is returned. All instances of pty.Cmd should flow through this function to ensure
40+
// proper resource constraints are applied to the child process.
3741
funcPTYCommandContext(ctx context.Context,cmdstring,args...string) (*pty.Cmd,error) {
3842
cmd,args,err:=agentExecCmd(cmd,args...)
3943
iferr!=nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp