WSDoNotHandleSignalParameter (C Function)
long WSDoNotHandleSignalParameter(WSEnvironmentParameter p,int s)
disables WSTP handling of signal s.
Details
- 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.
Examples
Basic Examples (1)
#include <signal.h>
#include "wstp.h"
int main()
{
WSEnvironmentParameter p;
WSENV env;
long apiResult;
p = WSNewParameters(WSREVISION, WSAPIREVISION);
if(p == (WSEnvironmentParameter)0)
{ /* Unable to create environment parameter object */ }
apiResult = WSDoNotHandleSignalParameter(p, SIGHUP);
if(apiResult != WSEOK)
{ /* Failed to disable SIGHUP signal handling */ }
env = WSInitialize(p);
if(env == (WSENV)0)
{ /* Unable to create environment object */ }
WSReleaseParameters(p);
/* ... */
WSDeinitialize(env);
return 0;
}