Oleg Gopov(deleted)
07/28/2009 3:08 AM
post34685
|
Hello Andy. Thank you for the attention to my problem.
I almost resolve my problem. My programm is resource manager, then i have infinite cycle, then dispatch messages (write,
read, ioctl and etc).
Something like this
while (1) {
if ((ctp = resmgr_block (ctp)) == NULL) {
perror ("Unable to resmgr_block\n");
exit (EXIT_FAILURE);
}
resmgr_handler (ctp);
}
Then in order that exit my program i force to push Terminate button (red rectangle in Debug Perspective). Because of
this code coverage utility don't work properly .
I have comment this infinite cycle and all work fine.
I have a question. Can i send signal from the Momentics IDE to the my programm???
I want to do something like this
void signal_handler()
{
exit_flag=false;
}
void main()
{
exit_flag=true;
while (exit_flag) {
if ((ctp = resmgr_block (ctp)) == NULL) {
perror ("Unable to resmgr_block\n");
exit (EXIT_FAILURE);
}
resmgr_handler (ctp);
}
}
|
|
|