mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 23:28:29 +00:00
base-linux: reflect SIGCHLD as Cpu_session signal
With this patch, core responds to SIGCHLD signals of terminating Genode processes by reflecting these events as exceptions to the CPU session interface. This way, Genode processes become able to respond to terminating Genode child processes.
This commit is contained in:
20
base-linux/src/base/env/platform_env.cc
vendored
20
base-linux/src/base/env/platform_env.cc
vendored
@ -20,6 +20,9 @@
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************
|
||||
** Support for Platform_env_base::Rm_session_mmap **
|
||||
****************************************************/
|
||||
@ -95,7 +98,9 @@ void Platform_env::Local_parent::close(Session_capability session)
|
||||
|
||||
|
||||
Platform_env::Local_parent::Local_parent(Parent_capability parent_cap)
|
||||
: Parent_client(parent_cap) { }
|
||||
: Parent_client(parent_cap)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/******************
|
||||
@ -142,6 +147,19 @@ Platform_env::Local_parent &Platform_env::_parent()
|
||||
}
|
||||
|
||||
|
||||
Platform_env::Platform_env()
|
||||
:
|
||||
Platform_env_base(static_cap_cast<Ram_session>(_parent().session("Env::ram_session", "")),
|
||||
static_cap_cast<Cpu_session>(_parent().session("Env::cpu_session", "")),
|
||||
static_cap_cast<Pd_session> (_parent().session("Env::pd_session", ""))),
|
||||
_heap(Platform_env_base::ram_session(), Platform_env_base::rm_session())
|
||||
{
|
||||
/* register TID and PID of the main thread at core */
|
||||
cpu_session()->thread_id(parent()->main_thread_cap(),
|
||||
lx_getpid(), lx_gettid());
|
||||
}
|
||||
|
||||
|
||||
/*****************************
|
||||
** Support for IPC library **
|
||||
*****************************/
|
||||
|
Reference in New Issue
Block a user