Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
Catching SIGINT in MEX files from within Matlab GUI

Subject: Catching SIGINT in MEX files from within Matlab GUI

From: Cody

Date: 29 Aug, 2013 10:40:27

Message: 1 of 1

Hello, I'm trying to catch SIGINT (ctrl-c) in an infinite while() loop within a MEX file executed from the Matlab GUI. I've had some success doing this by replacing Matlab's default signal handler using the sigaction() function as is mentioned in numerous other threads in the newsgroup, however this only works when Matlab is running in text mode (using -nodesktop mode). I'd like to have signal catching functionality within MEX files from within the Matlab GUI.

Strictly speaking, it doesn't actually have to be a SIGINT... any user-initiated action that I can detect from within the while() loop should work.

Cheers and thanks,

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us