mirror of
https://sourceware.org/git/glibc.git
synced 2025-09-01 05:02:03 +03:00
Tue Dec 19 17:00:42 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* hurd/hurdpid.c (_S_msg_proc_newids): Only run the hook when the pgrp changes.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
Tue Dec 19 17:00:42 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* hurd/hurdpid.c (_S_msg_proc_newids): Only run the hook when the
|
||||||
|
pgrp changes.
|
||||||
|
|
||||||
Mon Dec 18 13:40:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
Mon Dec 18 13:40:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||||
|
|
||||||
* stdio/fread.c: Don't increment __offset when it's -1.
|
* stdio/fread.c: Don't increment __offset when it's -1.
|
||||||
|
@@ -49,23 +49,24 @@ _S_msg_proc_newids (mach_port_t me,
|
|||||||
task_t task,
|
task_t task,
|
||||||
pid_t ppid, pid_t pgrp, int orphaned)
|
pid_t ppid, pid_t pgrp, int orphaned)
|
||||||
{
|
{
|
||||||
|
int pgrp_changed;
|
||||||
|
|
||||||
if (task != __mach_task_self ())
|
if (task != __mach_task_self ())
|
||||||
return EPERM;
|
return EPERM;
|
||||||
|
|
||||||
__mach_port_deallocate (__mach_task_self (), task);
|
__mach_port_deallocate (__mach_task_self (), task);
|
||||||
|
|
||||||
|
pgrp_changed = pgrp != _hurd_pgrp;
|
||||||
_hurd_ppid = ppid;
|
_hurd_ppid = ppid;
|
||||||
_hurd_pgrp = pgrp;
|
_hurd_pgrp = pgrp;
|
||||||
_hurd_orphaned = orphaned;
|
_hurd_orphaned = orphaned;
|
||||||
|
|
||||||
/* Run things that want notification of a pgrp change. */
|
if (pgrp_changed)
|
||||||
RUN_HOOK (_hurd_pgrp_changed_hook, (_hurd_pgrp));
|
/* 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. */
|
/* Notify any waiting user threads that the id change as been completed. */
|
||||||
++_hurd_pids_changed_stamp;
|
++_hurd_pids_changed_stamp;
|
||||||
#ifdef noteven
|
|
||||||
__condition_broadcast (&_hurd_pids_changed_sync);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user