Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part I Write a C program called executebash.c . It forks a child process to execute a bash script named mybash. This mybash program prints

Part I
Write a C program called executebash.c. It forks a child process to execute a bash script
named mybash. This mybash program prints on the screen
EXAM! EXAM! EXAM!
Then the parent process prints on the screen
STUDY! STUDY! STUDY!
Part II
Write a C program to execute multiple Unix commands in parallel.
The number of Unix commands is not fixed.
There is no communication among the Unix commands.
The Unix commands are given as command line arguments.
For simplicity, you can assume that each Unix command has exactly one
argument except that the last one can have either no argument or one argument.
For example,
>>>>> miniminishell cat openfile.c ls l ps
includes three Unix commands: cat with one argument openfile.c, ls with one argument
l, and ps with no argument.
For each Unix command, use a separate process to execute it. You need to print out each
process id

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

International Baccalaureate Computer Science HL And SL Option A Databases Part I Basic Concepts

Authors: H Sarah Shakibi PhD

1st Edition

1542457084, 978-1542457088

More Books

Students also viewed these Databases questions