Home /
Expert Answers /
Computer Science /
tasks-listen-to-the-presentation-or-start-programming-if-you-know-what-to-do-you-need-an-e-pa778
(Solved):
Tasks: - Listen to the presentation. Or start programming, if you know what to do. - You need an e ...
Tasks: - Listen to the presentation. Or start programming, if you know what to do. - You need an echo server code to complete the assignments below (from our previous lab). If it is not working properly, finish it first (and be quick). The server should be able to handle multiple requests over one connection (echo multiple strings), and be able to proceed to the next client once the current disconnects (you need two loops in the code). worth 4 points) Modify the programs to make it a daemon: - fork off the parent process, - create unique session ID, - change current working directory to a safe location, - change file mode mask, - close standard file descriptors.
We will use C programing to solve this question. lets first Start by creating a new file called main.c in src directory, with this content. now we need to add this content to conanfile.txt [generators] cmake Then we specify a single generator called cmake, now change to the build directory and execute this command:
Now let us get back to the other file called CMakeLists.txt it has the following content Now we need to be inside the build directory to execute this command: cmake .. now to create the executable we defined earlier just execute this command make bin/ctest