summaryrefslogtreecommitdiff
path: root/proc/mgt.c
AgeCommit message (Collapse)Author
2002-05-082002-05-07 Roland McGrath <roland@frob.com>Roland McGrath
* mgt.c (S_proc_reauthenticate, S_proc_getallpids): Likewise. (add_tasks, S_proc_dostop): Likewise. (S_proc_exception_raise): int -> integer_t * pgrp.c (S_proc_getsessionpids, S_proc_getsessionpgids): Likewise. (S_proc_getpgrppids): Likewise.
2001-08-142001-08-14 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* mgt.c (S_proc_dostop): If task_threads fails, resume the suspended task.
2001-08-062001-08-06 Roland McGrath <roland@frob.com>Roland McGrath
* mgt.c (allocate_proc): Don't zero P->p_pi. Reported by Neal H Walfield <neal@cs.uml.edu>.
2001-08-042001-08-04 Roland McGrath <roland@frob.com>Roland McGrath
* mgt.c (process_has_exited): Call ports_interrupt_rpcs last thing.
2001-08-042001-08-04 Roland McGrath <roland@frob.com>Roland McGrath
* mgt.c (S_proc_reauthenticate): Release global_lock while making RPC. Don't mach_port_deallocate an argument port when returning an error, because mig does it for us. 2001-08-03 Roland McGrath <roland@frob.com> * mgt.c (allocate_proc): Use memset instead of lots of 0 initializers.
2001-08-022001-08-01 Roland McGrath <roland@frob.com>Roland McGrath
* mgt.c (genpid): Rewritten.
2001-08-022001-08-02 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* mgt.c (genpid): Before checking if NEXTPID is free, check if it is greater than WRAP, and if yes, start over.
2001-04-152000-04-03 Neal H Walfield <neal@cs.uml.edu>Roland McGrath
* proc.h (struct ids): Drop gids and ngids, we never use them. Turn uids into a zero length array. * mgt.c (make_ids): Conform to new semantics. (ids_free): Removed. Rendered obsolete by ids_rele. (ids_rele): New function. Drop a reference to the given ids. (ids_ref): Add a reference to the given ids. (S_proc_reauthenticate): Use ids_rele and new make_ids semantics. (S_proc_child): Use ids_rele and ids_ref. (create_startup_proc): Conform to new make_ids semantics. (complete_proc): Use ids_ref. (process_has_exited): Use ids_rele. * host.c: Doc fix: ``Implement foo as described in <hurd/proc.defs>'' => ``Implement foo as described in <hurd/process.defs>'' * info.c: Likewise. * mgt.c: Likewise. * pgrp.c: Likewise. * wait.c: Likewise. * mgt.c (S_proc_reauthenticate): Calculate the value of NGEN_UIDS, NAUX_UIDS, NGEN_GIDS AND NAUX_GIDS; do not use a constant. (create_startup_proc): Add asserts. * host.c (S_proc_setexecdata): Check for memory allocation errors. Use memcpy, not bcopy. (S_proc_getexecdata): Likewise. (S_proc_execdata_notify): Check return of malloc. (S_proc_register_version): Likewise. (initialize_version_info): Add asserts. * info.c (S_proc_pid2task): Do not bother searching for the pid if we do not have a valid caller. (S_proc_pid2proc): Likewise. Use memcpy, not bcopy. (S_proc_getprocinfo): Doc fixes. Use MAP_FAILED not -1. Use memcpy, not bcopy. (S_proc_getloginpids): Check return value of malloc. Use realloc correctly. (S_proc_setlogin): Check return value of malloc. * main.c (main): Assert allocate_proc. * mgt.c (make_ids): Check return value of malloc and fail accordingly. (S_proc_reauthenticate): Check return value of make_ids and fail accordingly. (S_proc_child): Call task_find after we know that we were passed a valid child. (S_proc_reassign): Likewise. (S_proc_handle_exceptions): Use memcpy, not bcopy. (allocate_proc): Check return value of ports_create_port and fail accordingly. (create_startup_proc): Add asserts. (complete_proc): Do not assume the length of "<none>". * msg.c (S_proc_getmsgport): Call pid_find_allow_zombie after we know we were passed a valid caller. * pgrp.c: Include assert.h. (new_pgrp): Check return value of malloc and fail accordingly. (new_session): Likewise. (boot_setsid): Assert sess. (S_proc_getsessionpids): Use MAP_FAILED not -1. (S_proc_getsessionppids): Likewise. (S_proc_getpgrppids): Likewise. * wait.c (S_proc_wait): Use memset, not bzero.
2000-03-142000-03-13 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* mgt.c (S_proc_exception_raise): Check for MACH_SEND_NOTIFY_IN_PROGRESS rather than MACH_SEND_INVALID_NOTIFY. Don't deallocate THREAD and TASK ports before the switch, since the successful case uses THREAD again and the failure case uses TASK again. Instead, deallocate them at the end of the successful case. At the end of the error case, use mach_port_destroy on THREAD only.
2000-03-122000-03-12 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* mgt.c (allocate_proc): Don't do mach_port_request_notification here. (proc_death_notify): New function, do it here instead. (complete_proc): Call proc_death_notify. * main.c (main): Call proc_death_notify on STARTUP_PROC after we have set its task port. * proc.h: Declare proc_death_notify.
1999-07-111999-07-09 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* info.c (get_string_array): Use mmap instead of vm_allocate. (S_proc_getprocinfo): Likewise. (S_proc_getloginpids): Likewise. * mgt.c (S_proc_getallpids): Likewise. * pgrp.c (S_proc_getsessionpids): Likewise. (S_proc_getsessionpgids): Likewise. (S_proc_getpgrppids): Likewise.
1999-07-111999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* info.c: Add #include <sys/mman.h> for munmap decl. * mgt.c: Likewise.
1999-07-031999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* info.c (get_string): Use munmap instead of vm_deallocate. (get_vector): Likewise. (get_string_array): Likewise. (S_proc_getprocinfo): Likewise. * mgt.c (S_proc_reauthenticate): Likewise. (S_proc_dostop): Likewise. (add_tasks): Likewise.
1999-06-051999-06-05 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* mgt.c (create_startup_proc): Don't call add_proc_to_hash here. * main.c (main): Do it here instead, after we have the task port.
1999-06-051999-06-05 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* mgt.c (allocate_proc, complete_proc): New functions, broken out of new_proc. Remove magic handling of PIDs 0 and 1. (new_proc): Now just call those two. Made static. (create_startup_proc): New function, also broken out of old new_proc. Do special setup for PID 1 (init) proc structure here. * proc.h: Update decls. * main.c (main): Use create_startup_proc for startup_proc, and allocate_proc + complete_proc (with PID 0) for self_proc. * mgt.c (make_ids): Add const to arguments.
1999-05-301999-05-29 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* mgt.c (add_tasks): Skip invalid (null) rights in tasks array. * info.c (S_proc_pid2task): Add assert for p_task right validity.
1999-03-141999-03-14 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* mgt.c (S_proc_reassign): Remove unused variable FOO.
1999-03-121999-03-11 Mark Kettenis <kettenis@gnu.org>Thomas Bushnell
* notify.c (do_mach_notify_dead_name): Remove unnecessary braces. * msg.c (S_proc_setmsgport): Remove unused variable FOO. (S_proc_getmsgport): Only check if the message port is still alive if it is not MACH_PORT_NULL. Use mach_port_type instead of mach_port_get_refs to check if the port is dead. * mgt.c (S_proc_reassign): Use mach_port_destroy to release the old task port.
1999-03-09Tue Mar 9 13:11:43 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* notify.c (do_mach_notify_dead_name): Don't check against P->p_msgport anymore. * msg.c (message_port_dead): Delete function. (S_proc_setmsgport): Don't request a dead-name notification anymore. (S_proc_getmsgport): Check to see if P->p_msgport is dead before returning it. * mgt.c (S_proc_reassign): Only use mach_port_deallocate to release P->msgport. (process_has_exited): Likewise. * proc.h (message_port_dead): Delete prototype.
1999-03-09Tue Mar 9 13:11:43 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* mgt.c (S_proc_reassign): It's not necessary to re-request the task-death notification; we've moved both the task right and the proc port that gets the notification, so delete that. * mgt.c (S_proc_reassign): Use mach_port_destroy instead of mach_port_deallocate to release P->p_msgport, for the same reasons as the changes below.
1999-03-07Sun Mar 7 18:19:07 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* mgt.c (process_has_exited): Use mach_port_destroy instead of mach_port_deallocate to release P->p_msgport. (complete_exit): Likewise for P->p_task. These changes eliminate a race; we are destroying the receiver of the dead-name notifications on these ports, but if that means we lose a notification, then the ref-count on the name will get incremented and we can't re-decrement it since we never hear the notification.
1996-07-18*** empty log message ***Michael I. Bushnell
1996-07-18*** empty log message ***Michael I. Bushnell
1996-07-18Thu Jul 18 04:15:49 1996 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* mgt.c (add_tasks): Fix vm_deallocate call to use mach_task_self () instead of mach_host_self ().
1996-07-08(S_proc_reauthenticate): Don't use unsafe MOVE_SEND in user-sideMichael I. Bushnell
interruptible RPC.
1996-07-03(process_has_exited): When reparenting children to init, if one ofMichael I. Bushnell
them is dead, alert init.
1996-05-24(process_has_exited): Don't call alert_parent if P->p_task is nullMichael I. Bushnell
(which happens only if this is the stub process in proc_reassign). This because the parent is uninvolved in the death of stubp.
1996-05-10(S_proc_exception_raise): Fetch sigcode from correctly named member ofMichael I. Bushnell
HSD.
1996-05-09(S_proc_reauthenticate): Use new authentication interface.Michael I. Bushnell
(S_proc_setowner): Expect and interpret new CLEAR parm. (S_proc_exception_raise): Set P->p_sigcode; use new _hurd_exception2signal args.
1996-04-15(process_has_exited): Clear p->p_waited.Michael I. Bushnell
1996-03-29(S_proc_reassign): Use new ports_transfer_right call instead ofMichael I. Bushnell
claim/install sequence; the latter has leaves the port out of any hash table for a time, which produces a race with incoming messages.
1996-03-21(new_proc): Oops, reinstall code to request dead name notification onMichael I. Bushnell
the task port.
1996-03-20(complete_exit): Leave pgrp here.Michael I. Bushnell
(process_has_exited): Not here.
1996-03-20(new_proc): Initialize P->p_wakeup.Michael I. Bushnell
1996-02-09(S_proc_exception_raise): Rewritten.Roland McGrath
(S_proc_handle_exceptions): Don't set E->replyport. (S_proc_exception_raise_reply): Function removed.
1995-12-20(S_proc_reassign):Miles Bader
Have notifications sent to the correct request port. Once we've given STUBP's request port to P, don't leave it in STUBP, so process_has_exited() doesn't dealloc it.
1995-12-20(new_proc): Don't set P->p_noowner for processes 0 and 1.Michael I. Bushnell
1995-12-19(S_proc_reauthenticate): Reverse miles' last chonge.Michael I. Bushnell
1995-12-19(S_proc_reauthenticate): Don't return 0 for the new port.Miles Bader
1995-06-27(S_proc_dostop): Remove assigments from inside if tests.Michael I. Bushnell
1995-01-19More of same.Roland McGrath
1995-01-19(S_proc_child): Use nowait_msg_proc_newids instead of nowait_proc_newids.Roland McGrath
1995-01-17(check_uid): Return true if P has root.Roland McGrath
1994-11-03entered into RCSMichael I. Bushnell
1994-10-14Formerly mgt.c.~22~Roland McGrath
1994-10-14Formerly mgt.c.~21~Roland McGrath
1994-09-10Formerly mgt.c.~20~Roland McGrath
1994-08-31Formerly mgt.c.~19~Michael I. Bushnell
1994-08-29Formerly mgt.c.~18~Michael I. Bushnell
1994-08-19Formerly mgt.c.~17~Michael I. Bushnell