Logo Search packages:      
Sourcecode: ladish version File versions  Download package

bool ladish_app_supervisor_start_app ( ladish_app_supervisor_handle  supervisor_handle,
ladish_app_handle  app_handle 
)

Start an app. The app must be in stopped state.

Parameters:
[in]supervisor_handlesupervisor object handle
[in]app_handleHandle of app to start
Returns:
success status

Definition at line 623 of file app_supervisor.c.

References LADISH_APP_STATE_STARTED.

{
  app_ptr->zombie = false;

  ASSERT(app_ptr->pid == 0);

  if (!loader_execute(
        supervisor_ptr->name,
        supervisor_ptr->project_name,
        app_ptr->name,
        supervisor_ptr->dir != NULL ? supervisor_ptr->dir : "/",
        app_ptr->terminal,
        app_ptr->commandline,
        &app_ptr->pid))
  {
    return false;
  }

  ASSERT(app_ptr->pid != 0);
  app_ptr->state = LADISH_APP_STATE_STARTED;

  emit_app_state_changed(supervisor_ptr, app_ptr);
  return true;
}

Generated by  Doxygen 1.6.0   Back to index