subject

Finish the code where it says //YOUR CODE HERE

//--- Definition of functions: ---//

// PURPOSE: To:
// (1) Make two pipes:
// (a) the first is for the parent process to talk to the
// child process running 'DECODER_PROG_NAME'
// (b) the second is for the child process running
// 'DECODER_PROG_NAME' to talk to the parent process.
//
// (2) Make the child process and puts its process id in global
// variable 'decoderPid'. The this child process should:
// dup2(somePipeFileDescriptor, STDIN_FILENO)
// to get its input from the "to decoder" pipe, and should:
// dup2(somePipeFileDescriptor, STDOUT_FILENO)
// to send its output to the "to parent" pipe.
// It should close() all unneeded pipe file descriptors and
// execute DECODER_PROG_NAME (a string constant defined in
// the header file).
//
// Meanwhile, the parent should close() the file descriptors
// only used by the child, set 'toDecodeFd' to the pipe file
// descriptor for talking to DECODER_PROG_NAME, and set 'toParentFd',
// to the pipe file descriptor for talking to the parent.
//
// (3) Return true (a C++ constant) on success or false otherwise.
bool didStartDecoders()
{
// I. Application validity check:
// II. Start decoder:
int toDecode[2];
int toParent[2];

// YOUR CODE HERE

// III. Finished:
return(true);
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Draw the hierarchy chart and design the logic for a program that calculates service charges for hazel's housecleaning service. the program contains housekeeping, detail loop, and end-of-job modules. the main program declares any needed global variables and constants and calls the other modules. the housekeeping module displays a prompt for and accepts a customer's last name. while the user does not enter for the name, the detail loop accepts the number of bathrooms and the number of other rooms to be cleaned. the service charge is computed as $40 plus $15 for each bathroom and $10 for each of the other rooms. the detail loop also displays the service charge and then prompts the user for the next customer's name. the end-of-job module, which executes after the user enters the sentinel value for the name, displays a message that indicates the program is complete.
Answers: 2
question
Computers and Technology, 22.06.2019 08:00
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
question
Computers and Technology, 22.06.2019 09:30
What are the steps involved in accepting all the changes in a document? arrange these in order click edit. click accept or reject. click changes. click accept all.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
You know the right answer?
Finish the code where it says //YOUR CODE HERE

//--- Definition of functions: ---//
Questions
question
Arts, 22.11.2020 01:00
question
Business, 22.11.2020 01:00
question
Social Studies, 22.11.2020 01:00
question
Biology, 22.11.2020 01:00
question
English, 22.11.2020 01:00
Questions on the website: 13722367