WSDoNotHandleSignalParameter()
This feature is not supported on the Wolfram Cloud.

long WSDoNotHandleSignalParameter(WSEnvironmentParameter p,int s)
disables WSTP handling of signal s.

DetailsDetails

  • Use WSDoNotHandleSignalParameter() to disable signal handling for signal s at WSInitialize() time.
  • WSDoNotHandleSignalParameter() returns WSEOK on success and a nonzero value if the function fails.
  • WSDoNotHandleSignalParameter() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

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

int main()
{
    WSEnvironmentParameter p;
    MLENV env;
    long apiResult;
    
    p = WSNewParameters(MLREVISION, MLAPIREVISION);
    if(p == (WSEnvironmentParameter)0)
    { /* Unable to create environment parameter object */ }

    apiResult = WSDoNotHandleSignalParameter(p, SIGHUP);
    if(apiResult != MLEOK)
    { /* Failed to disable SIGHUP signal handling */ }

    env = WSInitialize(p);
    if(env == (MLENV)0)
    { /* Unable to create environment object */ }

    WSReleaseParameters(p);

    /* ... */

    WSDeinitialize(env);
    return 0;    
}