lazyelm
asked on
Forking not speeding anything up?????
i am forking a call to another php script becuase it must connect to a mail server. It can take up to a minute to send depending on attachments and network traffic and other factors.
here is the code i am using to call the scrip that does the email functions
exec("start c:\php\php d:\web_projects\ltrak\wwwr oot\forked .php > NUL &");
When i call the script this way, it still waits for the exec to return so it does not speed anything up. I thought forking was meant to start a new process so that the current one can continue on with what it is doing.
Any ideas?
platform is win2k pro php 4.3.3 iis5
here is the code i am using to call the scrip that does the email functions
exec("start c:\php\php d:\web_projects\ltrak\wwwr
When i call the script this way, it still waits for the exec to return so it does not speed anything up. I thought forking was meant to start a new process so that the current one can continue on with what it is doing.
Any ideas?
platform is win2k pro php 4.3.3 iis5
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The program would spawn another process, return and let the child process do the work.
It would probably have to be written in C/C++
Alternatively you could cache the necessary mails to be sent, and use the Windows Equivlent of a Cron job EG wincron.