Original title: Retrieve exit status in with -s MODULARIZE=1 and -s EXIT_RUNTIME=0
I build my xetex executable as:
emcc -g -O2 -s MODULARIZE=1 -s EXPORT_NAME=busytex --pre-js $ROOT/texlive.js -s TOTAL_MEMORY=$TOTAL_MEMORY -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s FORCE_FILESYSTEM=1 -s LZ4=1 -s INVOKE_RUN=0 -s EXPORTED_FUNCTIONS='["_main"]' -s EXPORTED_RUNTIME_METHODS='["callMain","FS", "ENV"]' -o $ROOT/busytex.js $XETEX_OBJECTS $XETEX_DEPS $DVIPDF_DEPS $DVIPDF_OBJECTS $ROOT/busytex.c
And then I call callMain twice:
Module.callMain(['xetex', '--interaction=nonstopmode', '--halt-on-error', '--no-pdf', '--fmt=' + fmt_xelatex, source_name]);
Module.callMain(['dvipdfmx', source_name.replace('.tex', '.xdv')]);
Each of these runs calls exit(...) internally
How can I retrieve exit status of both runs?
I don't see any error message as in
|
var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)'; |
and Module.EXITSTATUS does not exist. onExit / exit / quit_ Module methods aren't somehow being run.
Thank you!
Original title: Retrieve exit status in with -s MODULARIZE=1 and -s EXIT_RUNTIME=0
I build my xetex executable as:
And then I call callMain twice:
Each of these runs calls
exit(...)internallyHow can I retrieve exit status of both runs?
I don't see any error message as in
emscripten/src/postamble.js
Line 406 in 605e3bd
Thank you!