Spawning process not working
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
HI I need a help to run windows exe file by passing 2 arguments continuously.I couldn't run spawn.m file i got error is "Attempt to execute SCRIPT spawn as a function:"
Thanks in advance
0 commentaires
Réponses (1)
Walter Roberson
le 22 Déc 2015
If you used spawn file contribution then your probably need to recompile the Cc code into a DLL: the DLL that is provided is probably only for Windows 32.
2 commentaires
Walter Roberson
le 23 Déc 2015
Modifié(e) : Walter Roberson
le 23 Déc 2015
I am not positive, but it looks like if you cd to the directory where the spawn.c code is, and you invoke
mex -v spawn.c
that you will get out an appropriate dll that would probably be named spawn.mexw64
Note: the difference between using spawn() and dos() is that spawn will allow you to access the exit code of what you run. spawn() is not for creating multiple threads, at least not in the form coded (but that could be adapted.) spawn() as coded waits for the process to finish.
spawn() is not at all suitable for the case of creating processes you need to be able to interact with by using standard I/O .
Voir également
Catégories
En savoir plus sur Application Deployment dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!