Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q Including the initial parent process, how many processes are created by the program shown in Figure 3.32? SHOW YOUR WORK, no points otherwise. #include

Q Including the initial parent process, how many processes are created by the program shown in Figure 3.32? SHOW YOUR WORK, no points otherwise.

image text in transcribed

#include #include windows.h> int main (voID) STARTUPINFO si; PROCESS INFORMATION pi; allocate memory Zero Memory G&si, sizeof (si)) si cb sizeof (si) Zero Memory C&pi, sizeof (pi)) create child process if CreateProcess (NULL, use command line C:\WINDOWS\\system32\\mspaint exe Command NULL, don't inherit process handle NULL, don't inherit thread handle FALSE, disable handle inheritance 0, no creation flags NULL, use parent's environment block NULL, use parent's existing directory &si &pi)) fprintf (stderr, Create Process Failed") return -1; parent will wait for the child to complete WaitForSingleObject Cpi.hProcess, INFINITE) printf ("Child Complete"); close handles Close Handle (poi hProcess); CloseHandle (pi.hThread)

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

Students also viewed these Databases questions