2
두 개의 C 프로그램이 있으며 일부 상위 프로그램 "parent.c"내부에서 자식 프로그램 "child.c"를 호출하려고하고 있습니다. child.c의 표준 출력. 이 일을 어떻게 하죠?다른 프로그램에서 C 프로그램 호출 및 macOS에서 자식 출력 얻기
macOS를 사용하고 있습니다. 여기
는parent.c처럼에 대한
while (1)
{
// call the child program
// capture the output from the child
if (child_output == some_condition)
{
break;
}
}
child.c
printf("Hello world!")
감사를 보일 수 있습니다 무엇 parent.c 및 child.c의 예 도움.