Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer this ASAP with code, commands and output too. To be done in Ubuntu in Virtualbox. Create a program in C that takes 2

please answer this ASAP with code, commands and output too. To be done in Ubuntu in Virtualbox.
image text in transcribed
Create a program in C that takes 2 Linux commands as command line arguments to your program, e.g., 1s, cal. These commands should then run in different processes. For example, Is runs in the child process and cal runs in the parent process. In order to run Linux commands from your C program, you can use execvp (char *command, char * params []) function. To read more about it, type man execvp in terminal. Make sure to keep the following in mind: - Linux commands are passed as command line arguments to your program - At least 2 Linux commands should be provided through command line arguments - Both the commands should run in separate processes, e.g., Is runs in the child process and cal runs in the parent process. - Make sure to display process ID for both parent and child process. - Finally, make sure to complete the child process before parent process completes its execution. Look into \#includeh> for more information on this

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

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions

Question

1. Identify and control your anxieties

Answered: 1 week ago