subject

This program doesn't terminate when it's run: #include "csapp. h" int main() { int fdsA[2]; int fdsB[2]; char buffer[2]; pid_t pid; Pipe(fdsA); Pipe(fdsB); pid = Fork(); if (pid == 0) { Dup2(fdsA[0], 0); Dup2(fdsB[1], 1); printf("hi"); fgets(buffer, 2, stdin); return 0; } Read(fdsB[0], buffer, 1); Write(fdsA[1], "ok", 2); Waitpid(pid, NULL, 0); return 0; } Why?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
Why would a programmer use the logical operator and in an if statement? a: when an action is to be taken that requires both conditions to be falseb: when an action is to be taken that requires both conditions to be truec: when an action is to be taken that requires the first condition to be falsed: when an action is to be taken that requires the second condition to be truei took the test and the answer is b.
Answers: 3
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Jennifer has to set up a network in a factory with an environment that has a lot of electrical interference. which cable would she prefer to use? jennifer would prefer to use because its metal sheath reduces interference.
Answers: 1
You know the right answer?
This program doesn't terminate when it's run: #include "csapp. h" int main() { int fdsA[2]; int fdsB...
Questions
question
Social Studies, 27.09.2021 17:00
question
Mathematics, 27.09.2021 17:00
question
Mathematics, 27.09.2021 17:00
question
Biology, 27.09.2021 17:00
question
Business, 27.09.2021 17:00
Questions on the website: 13722367