diff options
author | Miles Bader <miles@gnu.org> | 1995-04-05 00:17:00 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-04-05 00:17:00 +0000 |
commit | 8df1925c648ea3015b3dfece17a18923ace01f9e (patch) | |
tree | 5c11d9ae6d5e2efe5822d42468d7c082c231f4ee | |
parent | 4ee26e346663eb379be32b3b84b85251fa8007eb (diff) |
(proc_stat_set_flags): If PSTAT_NO_MSGPORT is set, don't use the msg port.
-rw-r--r-- | libps/procstat.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libps/procstat.c b/libps/procstat.c index 7b5c2fd5..591be53c 100644 --- a/libps/procstat.c +++ b/libps/procstat.c @@ -88,15 +88,23 @@ proc_stat_set_flags(proc_stat_t ps, int flags) int need; /* flags not set in ps, but desired to be */ process_t server = ps_context_server(ps->context); + if (flags & PSTAT_NO_MSGPORT) + /* Ensure that we don't try to use the process's msg port. */ + { + have |= PSTAT_NO_MSGPORT; + have &= ~PSTAT_MSGPORT; + } + /* Implement any inter-flag dependencies: if the new flags in FLAGS depend on some other set of flags to be set, make sure those are also in FLAGS. */ - if (flags & PSTAT_TTY) flags |= PSTAT_CTTYID; if (flags & PSTAT_STATE) flags |= PSTAT_EXEC_FLAGS; /* For the traced bit. */ - if (flags & (PSTAT_CTTYID | PSTAT_CWDIR | PSTAT_AUTH | PSTAT_UMASK | PSTAT_EXEC_FLAGS)) + if (flags & (PSTAT_CTTYID | PSTAT_CWDIR | PSTAT_AUTH | PSTAT_UMASK + | PSTAT_EXEC_FLAGS) + && !(have & PSTAT_NO_MSGPORT)) { flags |= PSTAT_MSGPORT; flags |= PSTAT_TASK; /* for authentication */ @@ -108,7 +116,6 @@ proc_stat_set_flags(proc_stat_t ps, int flags) need = flags & ~have; - /* MGET: If we're trying to set FLAG, and the preconditions PRECOND are set in the flags already, then eval CALL and set ERR to the result. If the resulting ERR is 0 add FLAG to the set of valid flags. ERR is |