UnixProcessParameters Struct
struct QProcess::UnixProcessParameters이 구조체는 Qt 6.6에 도입되었습니다.
자세한 설명
참고: 이 구조체는 유닉스 플랫폼에서만 사용할 수 있습니다.
이 구조체는 QProcess::setUnixProcessParameters()를 사용하여 자식 프로세스에 대한 추가 Unix 전용 구성을 전달하는 데 사용할 수 있습니다.
멤버는 다음과 같습니다:
- UnixProcessParameters::flags 플래그, 참조 QProcess::UnixProcessFlags
- UnixProcessParameters::lowestFileDescriptorToClose 닫을 가장 낮은 파일 기술자.
flags
필드에 QProcess::UnixProcessFlags::CloseFileDescriptors 플래그가 설정되어 있으면 QProcess 은 하위 프로세스를 실행하기 전에 응용 프로그램의 열린 파일 기술자를 닫습니다. 0, 1, 2(즉, stdin
, stdout
, stderr
)와 같이 lowestFileDescriptorToClose
필드 값보다 낮은 번호의 디스크립터는 그대로 유지됩니다.
위의 모든 설정은 QProcess::setChildProcessModifier()로 설정된 핸들러에서 각 POSIX 함수를 호출하여 수동으로 수행할 수도 있습니다. 이러한 구조를 통해 QProcess 은 플랫폼별 차이를 처리하고 특정 최적화의 이점을 누리며 코드 중복을 줄일 수 있습니다. 또한 이러한 함수 중 하나라도 실패하면 QProcess 은 QProcess::FailedToStart 상태가 되지만 하위 프로세스 수정자 콜백은 실패할 수 없습니다.
QProcess::setUnixProcessParameters() 및 QProcess::setChildProcessModifier()도 참조하세요 .
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.