Computers and Technology

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);
}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, terriblexsiren
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, Molly05
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is 50e0bf08e5b671@ualwgypg91wa5wl. uzo9kbud3qjwddygd5.vng -
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, addisonrausch
What season was better from fortnite?
Answers: 2
image
Computers and Technology, 23.06.2019 06:10, erick7123
The head restraint should be adjusted so that it reaches a. the top of your ears b. the base of your skull c. the top of the head
Answers: 1
Do you know the correct answer?
Finish the code where it says //YOUR CODE HERE

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

Questions in other subjects:

Konu
Geography, 10.11.2020 02:30
Konu
Mathematics, 10.11.2020 02:30
Konu
Physics, 10.11.2020 02:30