6
If I call a file, it contains the function exec()
, on two different terminals, the second will start running only when the first one finishes, or they work independently?
6
If I call a file, it contains the function exec()
, on two different terminals, the second will start running only when the first one finishes, or they work independently?
4
For each PHP "exec" call you create a new shell instance in a Linux environment, with your own environment variables.
In Windows I believe the behavior is similar.
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
Give a little more context to the question. You’re having some kind of problem executing commands with the function
exec()
?– Rodrigo Rigotti
@Rodrigorigotti I’m developing a web service project in which I have a file. php that accesses the database and also calls a file. cpp that calculates the best routes (on a map) from graph manipulation. As there will be several accesses to the server, it would not be possible to use only the function
exec()
if there is no parallelism in your calls. That is, if two users made the same request, both would receive the response in parallel, or neatly (user 2 receives response after user request 1 is met)?– Inversa