(cmd *exec.Cmd)
| 368 | func AutoBackgroundIfBlocking(startTime time.Time, manager *BackgroundManager, command, description, cmd string) (*BackgroundTask, error) { |
| 369 | if time.Since(startTime) >= time.Duration(assistantBlockingBudgetMs)*time.Millisecond && manager.CanAccept() { |
| 370 | return manager.StartBackgroundWithOptionalTimeout(command, description, cmd, nil) |
| 371 | } |
| 372 | return nil, nil |
| 373 | } |
| 374 | |
| 375 | func shellCommand(ctx context.Context, command string) *exec.Cmd { |
| 376 | argv := ShellArgv(command, "") |
| 377 | return exec.CommandContext(ctx, argv[0], argv[1:]...) |
| 378 | } |
| 379 | |
| 380 | func prepareProcessGroup(cmd *exec.Cmd) { |
| 381 | prepareProcessGroupForPlatform(cmd) |
| 382 | } |
| 383 | |
| 384 | func PrepareProcessGroup(cmd *exec.Cmd) { |
| 385 | prepareProcessGroup(cmd) |
| 386 | } |
| 387 | |
| 388 | func TerminateProcessTree(cmd *exec.Cmd) { |
| 389 | terminateProcessTreeForPlatform(cmd) |
no test coverage detected