LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

signal() funtion

I'd likie to response for the signals in my application.
How to do it? Code bellow doesn't work no signal is catched, why?
Only if I send the specified signal using raise function handler function is
called.
System platform WinNT 4.0, Win 2000.


void (*oldTerminateHandler)(int);

void terminateHandler(int par)
{
MessagePopup("Info","Signal catched- 'Terminate execution";
}

int main(void)
{
double val =0.0;

oldTerminateHandler = signal (SIGFPE terminateHandler);
val = 1.0 / val; // division by zero so signal should be sent to
application
}

Jaroslaw Przywieczerski
0 Kudos
Message 1 of 4
(3,358 Views)
Actually, this function is part of ANSI C standard so we have to include it to be compliant. However, Windows OS's do not support these signals. UNIX systems do support these signals. I will make a note to change the help for this function to reflect that Windows OS's do not support these signals.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
0 Kudos
Message 2 of 4
(3,358 Views)
OK.
So how to detect 'abnormal program termination'?
I'd like to write some information about crash to log file, is it possible?

Regards
Jaroslaw Przywieczerski

U¿ytkownik Chris Matthews w wiadomooci do grup dyskusyjnych
napisa³:50650000000500000038330000-993342863000@exchange.ni.com...
> Actually, this function is part of ANSI C standard so we have to
> include it to be compliant. However, Windows OS's do not support
> these signals. UNIX systems do support these signals. I will make a
> note to change the help for this function to reflect that Windows OS's
> do not support these signals.
>
> Best Regards,
>
> Chris Matthews
> Measurement Studio Support Manager
0 Kudos
Message 3 of 4
(3,358 Views)
There isn't a CVI function. It would have to be through SDK programming, but I don't have any experience with it so I'm not sure what the functions would be.
0 Kudos
Message 4 of 4
(3,358 Views)