OpenersNotesSection(Spacer1)Details

MLHandleSignal() does nothing on Microsoft Windows.

Use MLHandleSignal() to have the MathLink library utilize its signal-handling mechanism for the signal s.

MLHandleSignal() 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()
{
	MLENV env;
	
	env = MLInitialize((MLEnvironmentParameter)0);
	if(env == (MLEnvironmentParameter)0)
	{ /* Unable to create MathLink environment object */ }

	MLHandleSignal(env, SIGINT);

	/* ... */

	MLDeinitialize(env);

	return 0;
}

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