Шукаєте відповіді та рішення тестів для Operating systems (2024-2025)? Перегляньте нашу велику колекцію перевірених відповідей для Operating systems (2024-2025) в moodle.usth.edu.vn.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
when you type "ls" in the shell, what happens if you don't call fork() before execvp() ?
The fork() function returns:
When the shell has to execute a command "ls -l -h", the call to exec() can be:
when you type "ls" in the shell, what happens if you don't call waitpid() before looping and printing the prompt ?
When you create a pipe p
In the main loop of a shell, you have generally:
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); }