WSUnsetSignalHandler (C Function)

int WSUnsetSignalHandler(WSENV env,int signum,void *f)

removes the Unix signal-handler function f as a signal handler for signal signum from the WSTP library signal-handling mechanism.

Details

  • WSUnsetSignalHandler() does nothing on Microsoft Windows.
  • WSUnsetSignalHandler() returns WSEOK upon successful completion and one of the other error codes as specified in wstp.h in the event of an error.
  • WSUnsetSignalHandler() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

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

void s(int signum)
{
    /* ... */
}

/* remove a SIGHUP signal-handling function from a WSTP environment */
void f(WSENV ep)
{
    int err;

    err = WSUnsetSignalHandler(ep, SIGHUP, (void *)s);
    if(error != WSEOK)
        { /* unable to remove the function from WSTP's signal-handler mechanism */ }
}