UNIX Fork/Exec ExampleWindows Process CreationSlide 3CS 140 Lecture Notes: Introduction Slide 1UNIX Fork/Exec Exampleint pid = fork();if (pid == 0) { exec("foo"); } else { waitpid(pid, &status, options);};Child processParent processCS 140 Lecture Notes: Introduction Slide 2Windows Process CreationBOOL CreateProcess( LPCTSTR lpApplicationName, LPTSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCTSTR lpCurrentDirectory, LPSTARTUPINFO lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation);CS 140 Lecture Notes: Introduction Slide
View Full Document