Skip to content

Potential for app exit failure when not passing back RunStatus #480

@skliper

Description

@skliper

Describe the bug
CFE_ES_ExitApp reports error when passed in ExitStatus is CFE_ES_RunStatus_APP_RUN.

Typical app pattern (see https://github.com/nasa/sample_app/blob/master/fsw/src/sample_app.c) is:

  while (CFE_ES_RunLoop(&Sample_AppData.RunStatus) == TRUE) {do stuff}
 
  CFE_ES_ExitApp(Sample_AppData.RunStatus);

But CFE_ES_RunLoop does not update RunStatus on internal request to stop:

if ( CFE_ES_Global.AppTable[AppID].ControlReq.AppControlRequest != CFE_ES_RunStatus_APP_RUN )
{
/*
** We have an external request to stop
*/
ReturnCode = false;
}

To Reproduce
Steps to reproduce the behavior:

  1. Send RestartApp, will error and fail to restart.

Expected behavior
Set passed in RunStatus to the control request for the case above:
RunStatus = CFE_ES_Global.AppTable[AppID].ControlReq.AppControlRequest

Allows the App to take appropriate action.

System observed on:

  • cFS Dev Server
  • OS: Ubuntu 18.04
  • Versions: current dev (6.7.4)

Additional context
Fails build verification testing

Reporter Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions