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

ladish_app_handle ladish_app_supervisor_find_app_by_pid ( ladish_app_supervisor_handle  supervisor_handle,
pid_t  pid 
)

Search app by process id

Parameters:
[in]supervisor_handlesupervisor object handle
[in]pidpid of the app to search for
Returns:
app handle on if found; NULL if app is not found; the app handle is owned by the app supervisor object

Definition at line 214 of file app_supervisor.c.

{
  struct list_head * node_ptr;
  struct ladish_app * app_ptr;

  list_for_each(node_ptr, &supervisor_ptr->applist)
  {
    app_ptr = list_entry(node_ptr, struct ladish_app, siblings);
    if (app_ptr->pid == pid)
    {
      //log_info("app \"%s\" found by pid %llu", app_ptr->name, (unsigned long long)pid);
      return (ladish_app_handle)app_ptr;
    }
  }

  return NULL;
}

Generated by  Doxygen 1.6.0   Back to index