-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vxworks osapi.c utility task doesn't exit #120
Comments
Imported from trac issue 97. Created by abrown4 on 2015-08-31T14:30:11, last modified: 2019-08-14T14:11:46 |
Trac comment by abrown4 on 2015-11-25 17:11:19: See also #56, which adds an OS_ApplicationShutdown() and may run into the same issue when/if those changes are ported over to VxWorks. |
Note OS_ConsoleTask_Entry in posix/osapi.c is still a while(true) loop with no exit. rtems is also a while(true) for OS_ConsoleTask_Entry in rtems/osapi.c VxWorks task exits on semTake failure. I think that means this task will exit if the semaphore is deleted, but I also don't see it being deleted. It does facilitate being able to exit in a unit test though. |
There may be a simple fix here, by just checking the |
Fix #120, Exit console loop on shutdown
The vxworks osapi.c has an optional task that is started in OS_API_Init():
However, this utility task implementation has a while(TRUE) loop with no exit logic. For a "load and forever run it" scenario this may work, but for any other scenario where an orderly shutdown is desired by the user this means the task is never killed. One can get kernel crashes if the vxworks module is unloaded while that thread is still writing to output. The forever loop thread also makes line coverage difficult.
We need a robust method to always end this thread and to ensure the parent thread doesn't return to OS control while this thread is still hanging out there.
The text was updated successfully, but these errors were encountered: