This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via f0d6c01a0fb51904d5dd049be8402531ec185dcc (commit) from 10f2f857f6a38c89afff6bdfcc932e18e49ca9a2 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit f0d6c01a0fb51904d5dd049be8402531ec185dcc Author: Christophe Milard christophe.milard@linaro.org Date: Fri Nov 25 15:39:33 2016 +0100
linux-gen: _fdserver: request sigterm if parent dies
_fdserver now request SIGTERM if parent process (ODP instantiation process) dies, hence avoiding it to become orphan and reattached to the init process.
Signed-off-by: Christophe Milard christophe.milard@linaro.org Reviewed-by: Mike Holmes mike.holmes@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/_fdserver.c b/platform/linux-generic/_fdserver.c index 41a630b..9aed7a9 100644 --- a/platform/linux-generic/_fdserver.c +++ b/platform/linux-generic/_fdserver.c @@ -41,6 +41,8 @@ #include <odp_internal.h> #include <odp_debug_internal.h> #include <_fdserver_internal.h> +#include <sys/prctl.h> +#include <signal.h>
#include <stdio.h> #include <stdlib.h> @@ -622,6 +624,10 @@ int _odp_fdserver_init_global(void) /* TODO: pin the server on appropriate service cpu mask */ /* when (if) we can agree on the usage of service mask */
+ /* request to be killed if parent dies, hence avoiding */ + /* orphans being "adopted" by the init process... */ + prctl(PR_SET_PDEATHSIG, SIGTERM); + /* allocate the space for the file descriptor<->key table: */ fd_table = malloc(FDSERVER_MAX_ENTRIES * sizeof(fdentry_t)); if (!fd_table) {
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/_fdserver.c | 6 ++++++ 1 file changed, 6 insertions(+)
hooks/post-receive