The SAMPLE_APP, which is supposed to exemplify the current best practices, shouldn't be pending forever on a software bus message as it does here:
|
status = CFE_SB_RcvMsg(&SAMPLE_AppData.MsgPtr, |
|
SAMPLE_AppData.CommandPipe, |
|
CFE_SB_PEND_FOREVER); |
The problem with pending forever is that the app also needs to perform an orderly exit if a restart/reload/delete command is sent to ES, which is checked by CFE_ES_RunLoop(). If an app is pending forever for software bus messages but none are sent, then the shutdown request will remain pending indefinitely.
The SAMPLE_APP, which is supposed to exemplify the current best practices, shouldn't be pending forever on a software bus message as it does here:
sample_app/fsw/src/sample_app.c
Lines 85 to 87 in b956292
The problem with pending forever is that the app also needs to perform an orderly exit if a restart/reload/delete command is sent to ES, which is checked by
CFE_ES_RunLoop(). If an app is pending forever for software bus messages but none are sent, then the shutdown request will remain pending indefinitely.