✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
In the following code, we want data from A to be redirected to B. What should be the xxx and yyy parameters ? pipe(p); pid = fork(); if (pid == 0) { dup2(xxx); close(p[0]); close(p[1]); execlp("B", "B", NULL); } else { dup2(yyy); close(p[0]); close(p[1]); execlp("A", "A", NULL); }