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)
| 722 | // been successfully created, handler is invoked with the windows.ProcessInformation |
| 723 | // that was returned by the OS. |
| 724 | func 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 |
no test coverage detected
searching dependent graphs…