Hi all,
I don’t know if anyone has experienced that, but when I use RunProcess many times it suddenly stops to work, any process that I ask to run it delivers something like “command not find” error. It just starts to work again if I close Mathematica and launch it again. Do you guys have any idea what’s going on? I’m using Mathematica 10.1 and my SO is Ubuntu 14.04.
Hello Daniel, thank you for replying. I attached a simple notebook that reproduce the problem. It’s even worst than I first said, because now I see that help stops working too.
Thanks, Jim, this seems to be correct but runs forever with no stop. This is probably because pinging is a continues operation till stopped? Daniel any insights?
In[1]:= $Version
Out[1]= "10.3.1 for Microsoft Windows (64-bit) (December 9, 2015)"
In[2]:= RunProcess[{"C:\\windows\\system32\\netstat.exe", "-h"}]
During evaluation of In[2]:= RunProcess::pnfd: Program C:\windows\system32\netstat.exe not found. Check Environment["PATH"]. >>
Out[2]= $Failed
Seems to be 8 years after the original post and the problem resides.
The use case is a large loop processing thousands of files. From each file, some parameters, stored as binaries in specific fields that Mathematica cannot read them directly (unfortunately). So, I use a Perl program for that (exiftool). The call to exiftool succeeds for sever tens of times and then it fails, returning nothing (empty string), and this effects the rest of the program.
It happens for me with Mathematica on the MAC, Mathematica on PC Linux AND on the WEPC. The response of the EPC is the worst of all, since the response time of calling RunProcess under heavy load is the worst of all. Second worst is the MAC, because it is too fast. A modest 3 years old Linux machine is the best, but still multiple failures happens.
When I insert Pause inside the loop, just before the call to RunProcess it reduces (just reduces, not cancel) the number of failures BUT the performance of the program is reduced accordingly.