diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-07-22 19:09:02 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-07-22 19:09:02 +0000 |
commit | 63554c11f5deb5b42f0bcb9143e2c443602fa294 (patch) | |
tree | 0da50dcdd3e093d19432381ee4cc3b66055bb1a1 /proc | |
parent | c4c0b23a31082ed180512f238a155d348c0b477e (diff) |
(S_proc_setpgrp): Install bletcherous hack.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/pgrp.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/proc/pgrp.c b/proc/pgrp.c index a0231c79..0601bb64 100644 --- a/proc/pgrp.c +++ b/proc/pgrp.c @@ -295,11 +295,21 @@ S_proc_setpgrp (struct proc *callerp, pgid = p->p_pid; pg = pgrp_find (pgid); - if (p->p_pgrp->pg_session->s_sid == p->p_pid - || p->p_pgrp->pg_session != callerp->p_pgrp->pg_session - || ((pgid != p->p_pid - && (!pg || pg->pg_session != callerp->p_pgrp->pg_session)))) - return EPERM; + /* Temporary hack...XXX */ + if (pg || !zombie_check_pid (pgid)) + /* Look to see if this pgid is in use by a zombie; if so, + then don't do the permission check below. This is incorrect; + actually, zombies should be more real than they are now. + But the effect is right to avoid confusing bash in the case I + care about right now. */ + { + + if (p->p_pgrp->pg_session->s_sid == p->p_pid + || p->p_pgrp->pg_session != callerp->p_pgrp->pg_session + || ((pgid != p->p_pid + && (!pg || pg->pg_session != callerp->p_pgrp->pg_session)))) + return EPERM; + } if (p->p_pgrp != pg) { |