aboutsummaryrefslogtreecommitdiff
path: root/proc/host.c
Commit message (Collapse)AuthorAgeFilesLines
* Only use host_get_kernel_version and default_pager_paging_storage_new in x86_64.Flavio Cruz2023-05-111-0/+3
| | | | | | | | | | Also fixed the implementation of default_pager_paging_storage_new in proxy def pager to call into default_pager_paging_storage_new. We can fast track the simplification of the RPC ABI for x86_64 if we don't have MACH_MSG_TYPE_STRING used in RPCs which forces msgt_size to use more than 8 bits. Message-Id: <ZFsk/W+slpAZyTG1@jupiter.tail36e24.ts.net>
* proc: Port to x86_64Sergey Bugaev2023-05-101-5/+5
| | | | Message-Id: <20230508213136.608575-18-bugaevc@gmail.com>
* Use the new host_get_kernel_version introduced recently.Flavio Cruz2023-04-031-1/+6
| | | | | | https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=5447f965f1e109f7ac9aeb91c0e3906969a4adb8 provides more context. Message-Id: <ZBFkAXCYcj27UXRo@mars.tail36e24.ts.net>
* proc: Use ports_request_dead_name_notification ()Sergey Bugaev2022-08-101-9/+3
|
* Make RPC input array parameters constSamuel Thibault2022-01-161-5/+5
| | | | | This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
* Fix build warningsSamuel Thibault2022-01-011-3/+3
| | | | No actual behavior change.
* Simplify deallocations.Justus Winter2017-08-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | free (NULL) is a nop, therefore it is not necessary to check that first. Simplify the code accordingly. This commit is the result of the following semantic patch: @@ identifier X; @@ -if (X) free (X); +free (X); * console-client/console.c: Simplify accordingly. * console-client/driver.c: Likewise. * console-client/vga.c: Likewise. * ftpfs/dir.c: Likewise. * libftpconn/unix.c: Likewise. * libps/fmt.c: Likewise. * libps/proclist.c: Likewise. * libstore/mvol.c: Likewise. * nfs/ops.c: Likewise. * proc/host.c: Likewise. * sutils/fstab.c: Likewise.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-8/+8
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* Fix space styleSamuel Thibault2015-03-051-12/+12
|
* proc: store the device master port in _hurd_device_masterJustus Winter2013-11-281-1/+1
| | | | | | * proc/host.c (S_proc_getprivports): Adapt accordingly. * proc/main.c (main): Store the device master port in _hurd_device_master. * proc/proc.h (master_device_port): Remove unused variable.
* proc: store the privileged host port in _hurd_host_privJustus Winter2013-11-281-2/+2
| | | | | | | | | | | | | | | | | Store the privileged host port in _hurd_host_priv like it is done in the root filesystem. This fixes the thread priority adjustment in the proc server. Prior to this fix, a warning message "unable to adjust libports thread priority" sometimes appeared early in the boot process. * proc/host.c (S_proc_getprivports): Adapt accordingly. (S_proc_register_version): Likewise. * proc/mgt.c (add_tasks): Likewise. * proc/msg.c (tickle_init): Likewise. * proc/main.c (main): Store the privileged host port in _hurd_host_priv. * proc/proc.h: Remove unused variable master_host_port. fixup_store_priv_port
* Decouple the Hurd version from the package version.Thomas Schwinge2013-09-271-3/+4
| | | | | | | | * config.make.in (package-version): New variable. (hurd-version): Set to 0.3. * Makeconf (%: %.sh): Use package-version instead of hurd-version. * Makefile (stamp-version): Likewise. * doc/Makefile (stamp-version): Likewise.
* Fix duplicate port deallocation on errorSamuel Thibault2009-12-281-1/+2
| | | | | * proc/info.c (S_proc_register_version): Do not deallocate port `credential' when err != 0.
* 2002-05-07 Roland McGrath <roland@frob.com>Roland McGrath2002-05-081-32/+32
| | | | | | | | | * host.c (S_proc_setexecdata, S_proc_getexecdata): u_int -> size_t (initialize_version_info): Likewise. Fix cast in host_info arg. (get_string_array): Likewise. * info.c (get_string, S_proc_getprocargs, S_proc_getprocenv): Likewise. (S_proc_getprocinfo, S_proc_getloginpids): Likewise. (S_proc_getprocinfo): int -> size_t; fix casts in *_info argument.
* 2001-07-13 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2001-07-131-1/+12
| | | | | | | | | | | * host.c (S_proc_getexecdata): New variable PORTS_ALLOCATED. Set it if we allocated a new buffer for PORTS. If it is set, and allocation of a new buffer for INTS fails, unmap the buffer for PORTS. * host.c (S_proc_getexecdata): New variable I. Go over all standard ports and increase the send right user reference by one. Set *PORTSPOLY to MACH_MSG_TYPE_MOVE_SEND.
* 2001-05-12 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2001-05-121-1/+4
| | | | | * host.c (initialize_version_info): Clear last byte of KV to make sure that the string is null-terminated.
* 2000-04-03 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-04-151-21/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. * 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.
* Tue Sep 16 15:26:04 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1997-09-161-79/+2
| | | | | | * host.c (hostid, hostname, hostnamelen): Delete variables. (S_proc_sethostid, S_proc_gethostid, S_proc_sethostname, S_proc_gethostname): Delete functions.
* Fri Oct 25 20:30:22 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-10-261-3/+4
| | | | | | | | | | | | | | | * host.c: Include <version.h>. Thu Oct 24 16:13:40 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * host.c (initialize_version_info): Construct UNAME_INFO.machine with a dash instead of a slash so that it can be used as a file name component. * host.c (initialize_version_info): Copy our version into element 0 of server_versions, not element 1. Use HURD_VERSION instead of OUR_VERSION. Use literal "proc" instead of OUR_SERVER_NAME. * proc.h (OUR_SERVER_NAME, OUR_VERSION): Delete macro.
* *** empty log message ***Thomas Bushnell1996-09-051-69/+48
|
* Many changes to support multi-threading. See ChangeLog.Michael I. Bushnell1996-04-251-1/+23
|
* entered into RCSRoland McGrath1994-10-101-2/+15
|
* Formerly host.c.~9~Roland McGrath1994-10-031-142/+126
|
* Formerly host.c.~8~Roland McGrath1994-09-101-12/+12
|
* Formerly host.c.~7~Michael I. Bushnell1994-08-171-37/+4
|
* Formerly host.c.~6~Michael I. Bushnell1994-08-151-2/+60
|
* Formerly host.c.~5~Michael I. Bushnell1994-07-221-1/+1
|
* Formerly host.c.~4~Roland McGrath1994-05-121-61/+64
|
* Formerly host.c.~3~Michael I. Bushnell1994-05-091-0/+251
|
* Formerly host.c.~2~Michael I. Bushnell1994-05-061-11/+14
|
* Initial revisionMichael I. Bushnell1994-03-221-0/+204