이 페이지에서

QProcess::UnixProcessParameters Struct

struct QProcess::UnixProcessParameters

이 구조체는 Qt 6.6에서 도입되었습니다.

상세 설명

참고: 이 구조체는 Unix 플랫폼에서만 사용할 수 있습니다.

이 구조체는 ` QProcess::setUnixProcessParameters()`를 사용하여 자식 프로세스에 유닉스 고유의 추가 구성을 전달하는 데 사용할 수 있습니다.

이 구조체의 멤버는 다음과 같습니다.

  • 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()도 참조하십시오 .

© 2026 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.