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, 22.06.2019 07:00
Robots with telescoping arms are sometimes used to perform tasks (e.g., welding or placing screws) where access may be difficult for other robotic types. during a test run, a robot arm is programmed to extend according to the relationship r = 3 + 0.5cos(4θ) and the arm rotates according to the relationship θ=−π4t2+πt , where r is in feet, θ is in radians, and t is in seconds. use a computer program to plot the path of tip a in x and y coordinates for 0 ≤ t ≤ 4s.
Answers: 2
question
Computers and Technology, 23.06.2019 03:50
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
You know the right answer?
Finish the code where it says //YOUR CODE HERE

//--- Definition of functions: ---//
Questions
Questions on the website: 13722359