MLHandleSignal (C 函数)

MLHandleSignal 已经被 WSHandleSignal 所取代.

void MLHandleSignal(MLENV env, int s)

Enables the MathLink library signal-handling mechanism for the Unix signal s.

更多信息

  • MLHandleSignal() does nothing on Microsoft Windows.
  • Use MLHandleSignal() to have the MathLink library utilize its signal-handling mechanism for the signal s.
  • MLHandleSignal() is declared in the MathLink header file mathlink.h.

范例

基本范例  (1)

#include <signal.h>
#include "mathlink.h"

int main()
{
    MLENV env;
    
    env = MLInitialize((MLEnvironmentParameter)0);
    if(env == (MLEnvironmentParameter)0)
    { /* Unable to create MathLink environment object */ }

    MLHandleSignal(env, SIGINT);

    /* ... */

    MLDeinitialize(env);

    return 0;
}