0

Whenever I execute command via shell_exec() in PHP it automatically starts new process. Does PHP automatically terminate that process when the command is executed?

Thanks!

1
  • what do you mean? the exec'd process will run until it exits and returns to php. at that point the system will terminate the process anyways. once you call exec() (or any of the related functions), php is essentially suspended and out of the picture. Commented Jan 14, 2013 at 15:20

1 Answer 1

1

Once the commands have completed their execution PHP will automatically terminate the new process he launched and your script will continue (it can continue when the exec() commands are running but you need to redirect the output to a file)

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

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.