1

I do not know the inner workings of php exec() but I like to know if it create processes or threads for execution of external command.

3
  • You might take a look at the source code lxr.php.net Commented Dec 9, 2014 at 11:56
  • from the PHP man page it seems like at least on some operating systems it's a process, but of course this is implementation-specific. Can you say which OS you are interested in? Commented Dec 9, 2014 at 11:58
  • Ah, this indicates that it creates a new process Commented Dec 9, 2014 at 11:59

2 Answers 2

2

When you call exec php does not create a thread, it creats a new child process. more information here PHP exec() performance

Sign up to request clarification or add additional context in comments.

Comments

0

It has to be a process. You can't launch a new shell in a thread. Threads are delineations of a single process: you cannot start a new program without creating a new process.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.