WSHandleSignal (C Function)

void WSHandleSignal(WSENV env, int s)

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

Details

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

Examples

Basic Examples  (1)

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

int main()
{
    WSENV env;
    
    env = WSInitialize((WSEnvironmentParameter)0);
    if(env == (WSEnvironmentParameter)0)
    { /* Unable to create WSTP environment object */ }

    WSHandleSignal(env, SIGINT);

    /* ... */

    WSDeinitialize(env);

    return 0;
}