diff options
author | Roland McGrath <roland@gnu.org> | 1995-12-20 10:00:22 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-12-20 10:00:22 +0000 |
commit | f94a3574d523335c0158ee3445731077a1c872ef (patch) | |
tree | 2afbc2014c6dd4c0788e62e8f57f2e1a8b7cef70 /hurd/hurdpid.c | |
parent | 755f55b0dbb0ffadc0acf020123c727dcf558354 (diff) | |
download | glibc-f94a3574d523335c0158ee3445731077a1c872ef.tar.gz glibc-f94a3574d523335c0158ee3445731077a1c872ef.tar.xz glibc-f94a3574d523335c0158ee3445731077a1c872ef.zip |
Tue Dec 19 17:00:42 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> cvs/libc-951220
* hurd/hurdpid.c (_S_msg_proc_newids): Only run the hook when the pgrp changes.
Diffstat (limited to 'hurd/hurdpid.c')
-rw-r--r-- | hurd/hurdpid.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hurd/hurdpid.c b/hurd/hurdpid.c index 23594d9a10..fa52f19e4e 100644 --- a/hurd/hurdpid.c +++ b/hurd/hurdpid.c @@ -49,23 +49,24 @@ _S_msg_proc_newids (mach_port_t me, task_t task, pid_t ppid, pid_t pgrp, int orphaned) { + int pgrp_changed; + if (task != __mach_task_self ()) return EPERM; __mach_port_deallocate (__mach_task_self (), task); + pgrp_changed = pgrp != _hurd_pgrp; _hurd_ppid = ppid; _hurd_pgrp = pgrp; _hurd_orphaned = orphaned; - /* Run things that want notification of a pgrp change. */ - RUN_HOOK (_hurd_pgrp_changed_hook, (_hurd_pgrp)); + if (pgrp_changed) + /* Run things that want notification of a pgrp change. */ + RUN_HOOK (_hurd_pgrp_changed_hook, (pgrp)); /* Notify any waiting user threads that the id change as been completed. */ ++_hurd_pids_changed_stamp; -#ifdef noteven - __condition_broadcast (&_hurd_pids_changed_sync); -#endif return 0; } |