Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Makefile and Lab1.cpp which links this static library in the build process and uses some of the functions inside. Lab1.cpp must: 1. Call

Create a Makefile and Lab1.cpp which links this static library in the build process and uses some of the functions inside. Lab1.cpp must:

1. Call GetAllPids() and GetNameByPid() to print out all pids and their names.

2. Set pid to 1. Call GetNameByPid() and print out the name of pid 1.

3. Set name to "Lab1". Call GetPidByName() to get the pid of Lab1. Print "Lab1" and the pid of Lab1.

4. Set name to "Lab11". Call GetPidByName() to get the pid of Lab11. There should not be a process called Lab11, therefore this should test your error message generation system.

5. If any errors are generated in the calls to these functions, the error must be printed out by a call to the function GetErrorMsg() with the error number as an argument.

Please provide an answer for Lab1.cpp and Makefile in Linux code language, thank you!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

What are the disadvantages to being public?

Answered: 1 week ago

Question

Define procedural justice. How does that relate to unions?

Answered: 1 week ago