From e68a2b4d6aaa8de5556ce89dbb6816018d719696 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Mon, 23 Apr 2007 14:42:08 +0000 Subject: [PATCH] Extra flags RS_SIGNALED and RS_EXECFAILED. Pipe for detecting exec failures. --- servers/rs/manager.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/servers/rs/manager.h b/servers/rs/manager.h index e1862754d..642bbc2e1 100644 --- a/servers/rs/manager.h +++ b/servers/rs/manager.h @@ -62,6 +62,13 @@ extern struct rproc { /* Mapping for fast access to the system process table. */ extern struct rproc *rproc_ptr[NR_PROCS]; +/* Pipe for detection of exec failures. The pipe is close-on-exec, and + * no data will be written to the pipe if the exec succeeds. After an + * exec failure, the slot number is written to the pipe. After each exit, + * a non-blocking read retrieves the slot number from the pipe. + */ +int exec_pipe[2]; + /* Flag values. */ #define RS_IN_USE 0x001 /* set when process slot is in use */ #define RS_EXITING 0x004 /* set when exit is expected */ @@ -70,6 +77,8 @@ extern struct rproc *rproc_ptr[NR_PROCS]; #define RS_KILLED 0x020 /* driver is killed */ #define RS_CRASHED 0x040 /* driver crashed */ #define RS_LATEREPLY 0x080 /* no reply sent to RS_DOWN caller yet */ +#define RS_SIGNALED 0x100 /* driver crashed */ +#define RS_EXECFAILED 0x200 /* exec failed */ /* Constants determining RS period and binary exponential backoff. */ #define RS_DELTA_T 60 /* check every T ticks */