If I enter
MathKernel -noprompt -run 'ToExpression["1", TeXForm]; Exit'
the kernel hangs, apparently while running
TeX.exe as a
mathlink (see below). But when I remove
-noprompt, it runs just fine. Similar results hold if I pass these commands (to either
MathematicaScript) as a script.
Alternatively, even with
-noprompt, any of the other formats accepted by
ToExpression work just fine.
Any ideas why this happens?
Rather than printing the output, I could just write to file and send all the prompt garbage to
/dev/null, but this really doesn't fit into my tool chain very well. So I'd appreciate any solutions or workarounds. I'm running Mathematica 9.0 for Mac OS X x86 (64-bit) on OS X 10.6.8.
My evidence for believing that it's
TeX.exe causing the problem is that my processes look like this
2772 s000 S+ 0:00.28 /Applications/Local/Mathematica.app/Contents/MacOS/MathKernel -noprompt -run Print[ToExpression["1", TeXForm]];Exit 2773 s000 S+ 0:00.04 /Applications/Local/Mathematica.app/SystemFiles/Converters/Binaries/MacOSX-x86-64/TeX.exe -ml -mathlink -linkmode connect -linkprotocol SharedMemory -linkname jv5_shm
-noprompt, I also see
TeX.exe in the process list with the exact same arguments. But it's only there briefly, and it returns normally. Also, I can run
file TeX.exe, and see that it is indeed a Mac executable (not Windows, as the name would suggest).