MCPcopy Index your code
hub / github.com/tailscale/tailscale / StartProcessInSessionWithHandler

Function StartProcessInSessionWithHandler

util/winutil/restartmgr_windows.go:724–736  ·  view source on GitHub ↗

StartProcessInSessionWithHandler creates a new process using cmdLineInfo that will reside inside the session identified by sessID, with the security token whose logon is associated with sessID. The child process's environment will be inherited from the session token's environment. When the child pro

(sessID SessionID, cmdLineInfo CommandLineInfo, handler PostCreateProcessHandler)

Source from the content-addressed store, hash-verified

722// been successfully created, handler is invoked with the windows.ProcessInformation
723// that was returned by the OS.
724func StartProcessInSessionWithHandler(sessID SessionID, cmdLineInfo CommandLineInfo, handler PostCreateProcessHandler) error {
725 pi, err := startProcessInSessionInternal(sessID, cmdLineInfo, 0)
726 if err != nil {
727 return err
728 }
729 if handler != nil {
730 handler(pi)
731 return nil
732 }
733 windows.CloseHandle(pi.Process)
734 windows.CloseHandle(pi.Thread)
735 return nil
736}
737
738// RunProcessInSession creates a new process and waits up to timeout for that
739// child process to complete its execution. The process is created using

Callers 1

StartProcessInSessionFunction · 0.85

Calls 2

handlerInterface · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…