Question: Please, please, help Fun with dup: You are to write a program that writes to and reads from a local database. The database program is

Please, please, help Fun with dup: You are to write a programPlease, please, help

Fun with dup: You are to write a program that writes to and reads from a local database. The database program is implemented by a separate program called, say picodbd (for pico DB daemon). Once picodbd runs, it reads requests from standard-in cin in C+ parlance) and writes results to standard-out (cout in C++ parlance Your program is supposed to run picodbd in a separate process (using fork and exec, similar ot MP2). How will your program communicate with the DB daemon? Use the following skeleton to connect toc if (fork 0) { // child Hint: The easiest way is to use two unnamed pipes (one for each direction) and connect them to standard in and standard out of the DB daemon through the judicious use of dup2() Fun with dup: You are to write a program that writes to and reads from a local database. The database program is implemented by a separate program called, say picodbd (for pico DB daemon). Once picodbd runs, it reads requests from standard-in cin in C+ parlance) and writes results to standard-out (cout in C++ parlance Your program is supposed to run picodbd in a separate process (using fork and exec, similar ot MP2). How will your program communicate with the DB daemon? Use the following skeleton to connect toc if (fork 0) { // child Hint: The easiest way is to use two unnamed pipes (one for each direction) and connect them to standard in and standard out of the DB daemon through the judicious use of dup2()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!