NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Compact RIO C++ Using Eclipse

I am developing a system on the 9068 that is multi treaded.  I am trying to do a "shutdown".  I initialize bool variables to false and set them true when I want to shutdown.  I have a routine that I call to communicate that the tread has exited.  I then can do the Join action so the thread can completely exit.  I finally return to the small main routine which does a printf just before returning.  The printf is displayed on the console, but the module does not log out and the little red square stays red.  As a work around I was able to get the main routines thread ID and send a SIGALARM, but that seems so messy.

What is keeping the routine from completing (eclipse from logging out of the console)?

Thanks

Ray

0 Kudos
Message 1 of 3
(3,348 Views)

I was working on another change and in this case I entered the main routine and ended up returning (with a -1) without starting up any other part of the application.  So I had not threads, mutex, etc. created.  I do have the real time library loaded but not explicitly called.  It still failed to logout.

Any insight would be appreciated.

Thanks

0 Kudos
Message 2 of 3
(3,013 Views)

There are two higher-level issues here:

  1. I'm less familiar with how Eclipse connecting over an ssh connection, running an application, is supposed to behave for an application that exits successfully. This is largely due to my inexperience working with Eclipse, so maybe others could chime in, but if the process is still running it should be possible to use the actual debugger to determine what is still running.
  2. Biggest issue, really, is that you're attempting to explain what your code is doing when it would be much, much simpler if you posted the code for us to look at.

Finally, this forum is probably not the best place to ask general C/C++ type querries, and that's realistically what's being asked here.

0 Kudos
Message 3 of 3
(3,013 Views)