user1086516
user1086516

Reputation: 877

How does Java actually spawn a process by ProcessBuilder on Windows platform?

How does Java actually spawn a process by ProcessBuilder on Windows platform ? By what mechanism, system call, etc is actually doing the job? Javadoc doesn't specify and from the behavior exhibited by spawning processes its not immediately obvious.

Upvotes: 0

Views: 240

Answers (1)

ProcessBuilder#start calls ProcessImpl#start, which calls the ProcessImpl constructor, which calls ProcessImpl#create aka Java_java_lang_ProcessImpl_create, which calls processCreate, which calls the Win32 syscall CreateProcessW.

Upvotes: 1

Related Questions