Process.StartAndForget 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| 속성 | Description |
|---|---|
| StartAndForget(ProcessStartInfo) |
설명 |
| StartAndForget(String, IEnumerable<String>) |
지정된 파일 이름 및 선택적 인수를 사용하여 프로세스를 시작하고, 연결된 모든 리소스를 해제하고, 프로세스 ID를 반환합니다. |
StartAndForget(ProcessStartInfo)
- Source:
- Process.Scenarios.cs
설명 startInfo한 프로세스를 시작하고, 연결된 모든 리소스를 해제하고, 프로세스 ID를 반환합니다.
public:
static int StartAndForget(System::Diagnostics::ProcessStartInfo ^ startInfo);
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static int StartAndForget(System.Diagnostics.ProcessStartInfo startInfo);
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member StartAndForget : System.Diagnostics.ProcessStartInfo -> int
Public Shared Function StartAndForget (startInfo As ProcessStartInfo) As Integer
매개 변수
- startInfo
- ProcessStartInfo
ProcessStartInfo 프로세스를 시작하는 데 사용되는 정보가 들어 있는 항목입니다.
반품
시작된 프로세스의 프로세스 ID입니다.
- 특성
예외
startInfo은 null입니다.
하나 이상의 RedirectStandardInput, RedirectStandardOutput또는 RedirectStandardError 로 설정됩니다 true. 교착 상태를 방지하기 위해 리디렉션된 스트림을 드레이닝해야 하므로 화재 및 잊기 시나리오에서는 스트림 리디렉션이 지원되지 않습니다.
또는
UseShellExecute이 true로 설정됩니다. Windows 새 프로세스를 만들지 않아 유효한 프로세스 ID를 반환할 수 없으므로 fire-and-forget 시나리오에서는 셸 실행이 지원되지 않습니다.
설명
표준 핸들(StandardInputHandleStandardOutputHandle또는StandardErrorHandle)이 제공되지 않으면 기본적으로 null 파일로 리디렉션됩니다.
이 메서드는 호출자가 프로세스를 시작하려고 하고 더 이상 상호 작용할 필요가 없는 화재 및 잊어버리기 시나리오를 위해 설계되었습니다. 프로세스를 시작하고, 연결된 모든 리소스를 해제하고, 프로세스 ID를 반환합니다. 시작된 프로세스는 독립적으로 계속 실행됩니다.
적용 대상
StartAndForget(String, IEnumerable<String>)
- Source:
- Process.Scenarios.cs
지정된 파일 이름 및 선택적 인수를 사용하여 프로세스를 시작하고, 연결된 모든 리소스를 해제하고, 프로세스 ID를 반환합니다.
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static int StartAndForget(string fileName, System.Collections.Generic.IEnumerable<string>? arguments = default);
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member StartAndForget : string * seq<string> -> int
Public Shared Function StartAndForget (fileName As String, Optional arguments As IEnumerable(Of String) = Nothing) As Integer
매개 변수
- fileName
- String
시작할 실행 파일의 이름입니다.
- arguments
- IEnumerable<String>
프로세스에 전달할 명령줄 인수입니다. 추가 인수 없이 프로세스를 시작하는 빈 시퀀스를 전달하거나 빈 시퀀스를 전달 null 합니다.
반품
시작된 프로세스의 프로세스 ID입니다.
- 특성
예외
fileName은 null입니다.
fileName 가 비어 있습니다.
설명
이 메서드는 호출자가 프로세스를 시작하려고 하고 더 이상 상호 작용할 필요가 없는 화재 및 잊어버리기 시나리오를 위해 설계되었습니다. 프로세스를 시작하고, 프로세스 ID를 캡처하고, 연결된 모든 리소스를 해제하고, 프로세스 ID를 반환합니다. 시작된 프로세스는 독립적으로 계속 실행됩니다.
표준 핸들은 기본적으로 null 파일로 리디렉션됩니다.