Adding support of Console Provider program

Issue #238 new
Patryk Kubiak created an issue

Implementation reason

Actually the system uses default program as console provider, but it must not be always true. We have to ensure, that the program started for telnet thread (and others terminals) is always console provider.

Generic Description

The system has to allow for selecting a program as console provider. Program manager should be equipped with a function for getting console provider program. Provider should be configured in oc_programs_list.h file as string with name of the program from embedded programs list. There should be also a definition with array of arguments for the console provider. Program Manager has to also be enhanced with interface for running commands by using the console provider. Command should be given as string and passed to the provider as the last argument ( after arguments from the configuration ). Also telnet service implementation should be updated with using console provider program instead of default program. There should be definition in the configuration that allows for enabling and disabling usage of console provider to allow for compilation of the system also without terminal usage. Console provider has to be started automatically during boot of the system (at the end of Level 3 - InitializeLevel3). The provider should be rerun if it is not running in the idle task (oc_boot.c, function oC_Boot_Main)

Required Interface


#define CFG_STRING_CONSOLE_PROVIDER_ARGUMENTS              "--textlogin", "--safe-login"
// Returns a pointer to the console provider program
extern oC_Program_t  oC_ProgramMan_GetConsoleProvider( void );
// Runs default console provider
extern oC_ErrorCode_t oC_ProgramMan_RunDefaultConsoleProvider( oC_User_t User );
// Executes a command by using the console provider
// If outProcess is not #NULL, the function returns a pointer to the created process
// If User is #NULL, the function uses current user
extern oC_ErrorCode_t oC_ProgramMan_RunCommand( oC_User_t User, oC_Process_t * outProcess, const char * Command );
// Reruns default console provider if not running
extern oC_ErrorCode_t oC_ProgramMan_RerunDefaultConsoleProviderIfNotRun( oC_User_t User );


Link to trello board:


  • [ #245 ] - Providing support of standard system providers

List of requirements

  • [ #238 ] - Possibility of adding command arguments for console provider
  • [ #238 ] - System supports console provider
  • [ #238 ] - Console provider is used for Telnet service
  • [ #238 ] - Possibility of disabling console provider if it is not needed
  • [ #238 ] - Console provider is started with the system
  • [ #238 ] - Console provider is rerun if it is enabled but it is not running

Comments (12)

  1. Log in to comment