vendredi 20 février 2015

child_process.exec synchronization with outer EXE file

I have an Exe file which does some action , then write the result to log file. I want to activate the Exe , then after it's done read the log file and analyze it. my problem goes like this : let's say validate() is the function which reads the log file and analyze it. if I use child_process.exec('myExe.exe',validate); it does not work properly and throws an exception , because Node.js first try to open the log file , but it does not exist yet. If I try to do it synchronized like child_process.exec('myExe.exe'); validate();


same problem. any ideas how first to open the exe , then , only after it's done analyze the log file?


Aucun commentaire:

Enregistrer un commentaire