OpenersNotesSection(Spacer1)Details

Use MLDoNotHandleSignalParameter() to disable signal handling for signal s at (NonWLLink[MLInitialize(), paclet:/ref/c/MLInitialize]) time.

MLDoNotHandleSignalParameter() returns MLEOK on success and a nonzero value if the function fails.

MLDoNotHandleSignalParameter() is declared in the MathLink header file (RefLink[mathlink.h, paclet:/ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

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

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

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

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

	MLReleaseParameters(p);

	/* ... */

	MLDeinitialize(env);
	return 0;	
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLHandleSignal(), paclet:/ref/c/MLHandleSignal])  ▪  (NonWLLink[MLSetSignalHandler(), paclet:/ref/c/MLSetSignalHandler])  ▪  (NonWLLink[MLSetSignalHandlerFromFunction(), paclet:/ref/c/MLSetSignalHandlerFromFunction])  ▪  (NonWLLink[MLStopHandlingSignal(), paclet:/ref/c/MLStopHandlingSignal])  ▪  (NonWLLink[MLUnsetSignalHandler(), paclet:/ref/c/MLUnsetSignalHandler])  ▪  (NonWLLink[MLInitialize(), paclet:/ref/c/MLInitialize])  ▪  (NonWLLink[MLNewParameters(), paclet:/ref/c/MLNewParameters])}})}})