I just found that such MathLink
functions as LinkWrite
and LinkRead
have something like its own internal CheckAbort
that absorbs any aborts, and does not propagate them further.
This can be easily shown with LinkRead
:
link = LinkLaunch[First[$CommandLine] <> " -mathlink"];
LinkRead[link];
LinkWrite[link, Unevaluated[Pause[10]]];
{LinkRead[link], Print["!!"]}
After evaluating the above code press Alt+. and you will get the following output:
During evaluation of In[6]:= !!
Out[9]= {ReturnPacket[$Aborted], Null}
As you see the abort was absorbed by LinkRead
.
My problem is that it breaks my own flow control of evaluation based on CheckAbort
.
Is there a way to intercept aborts absorbed by such functions as LinkRead
and LinkWrite
?
mathematica
tag. Isn't that scary? – NumskullAsk Question
button – NumskullMathLink
was a bit evil, so this just proves it ... – Clotho