summaryrefslogtreecommitdiff
path: root/exec/main.c
AgeCommit message (Collapse)Author
2016-02-04exec: remove duplicate function callEsa Peuha
* exec/main.c (main) Remove second call to trivfs_startup from commit a5d384c.
2015-12-29fix compiler warnings in hurd/execFlavio Cruz
exec: Fix compiler warnings. * exec/elfcore.c: Cast arguments to vm_address_t. * exec/main.c: Use %lu in asprintf.
2015-09-27exec: convert to trivfs dynamic classes and bucketsJustus Winter
libtrivfs contains two ways of managing more than one port class and bucket. There is the old way of using a statically allocated array with explicit length, and the new way with dynamically allocated vectors. Converting all users to the new way of handling multiple classes and/or buckets, we can simplify the code in libtrivfs. In many cases, the code will be simpler and more expressive for the user. This also fixes a mild bug. The classes and buckets given to `trivfs_startup' end up in the dynamic vectors too, making the object lookup code use the more complicated code path. * exec/main.c: Convert to dynamic classes and buckets.
2015-09-23exec: add missing includeJustus Winter
* exec/main.c: Include `argz.h'.
2014-11-21startup: bind the startup server to /servers/startupJustus Winter
Previously, the Hurd (ab)used the fact that the startup server speaks all protocols on its message port. Any server that wished to register for shutdown notifications would use proc_getmsgport to get a port to the startup server. This hardcodes the PID of /hurd/startup, and does not allow one to point a server to ones own startup server (e.g. using remap). Bind the startup server to /servers/startup instead. Use this to contact the startup server. * exec/main.c (S_exec_init): Use /servers/startup. Fall back to the old method so that the system still boots when the node /servers/startup is missing. * hurd/paths.h (_SERVERS_STARTUP): New macro. * libdiskfs/boot-start.c (diskfs_S_fsys_init): Use /servers/startup. * libdiskfs/init-startup.c (_diskfs_init_completed): Likewise. * pfinet/main.c (arrange_shutdown_notification): Likewise. * startup/Makefile (OBJS): Add fsysServer.o. * startup/startup.c (demuxer): Handle the fsys protocol. (main): Bind to /servers/startup. (S_fsys_getroot): Implement fsys_getroot. Stub out the rest.
2014-09-29exec: add proper argument parsing, add --device-master-portJustus Winter
If the device master port is given, a boot-time exec server can print diagnostic messages earlier. * exec/main.c (opt_device_master): New variable. (OPT_DEVICE_MASTER_PORT): New macro. (options): New set of options. (parse_opt): New function. (trivfs_append_args): Likewise. (argp): Pull the argp definition out of main. (trivfs_runtime_argp): Set, so that we respond properly to fsysopts. (open_console): Pull the code out of S_exec_init and generalize it. (main): Call open_console if a device master port is given. (S_exec_init): Call open_console.
2014-05-26exec: add missing includesJustus Winter
* exec/exec.c: Include mach/gnumach.h. * exec/main.c: Include device/device.h.
2014-02-02exec: connect std{in,out,err} to the mach consoleJustus Winter
* exec/main.c (S_exec_init): Get the device master port and connect std{in,out,err} to the mach console.
2014-01-20exec: include the mig-generated server headers in main.cJustus Winter
GNU MIG recently gained support for emitting x_server_routine declarations in the generated server header file. Using this declaration, the x_server_routine functions can be inlined into the demuxer function. * exec/main.c: Include the mig-generated server headers.
2013-12-02exec: improve the exec_demuxer functionJustus Winter
Handle multiple request types as recommended by the Mach Server Writer's Guide section 4, subsection "Handling Multiple Request Types". This avoids initializing the reply message in every X_server function. The reply message has already been properly initialized in libports, so there is no need to call mig_reply_setup. Furthermore, move the exec_startup_server_routine to the end of the chain, as the startup related functions are only needed at system bootstrap time. * exec/main.c (exec_demuxer): Improve the demuxer function.
2013-11-01exec: Remove the remaining BFD related bitsJustus Winter
* exec/Makefile: Remove commented out lines related to BFD. * exec/hostarch.c: Remove all BFD related code. * exec/main.c: Likewise.
2013-08-28Define and use symbolic names for important processesJustus Winter
* include/pids.h: New file. * init/init.c (frob_kernel_process): Use symbolic name for kernel process. * exec/exec.c (S_exec_init): Use symbolic name for startup process. * libdiskfs/boot-start.c (diskfs_S_fsys_init): Likewise. * libdiskfs/init-startup.c (_diskfs_init_completed): Likewise. * pfinet/main.c (arrange_shutdown_notification): Likewise. * proc/mgt.c (create_startup_proc): Likewise. * proc/main.c (main): Use symbolic name for proc process.
2002-04-272002-04-27 Roland McGrath <roland@frob.com>Roland McGrath
* priv.h: Include <link.h> to get ElfW macro. * priv.h, exec.c, main.c, hostarch.c: Use `ElfW(TYPE)' in place of `Elf32_TYPE' throughout.
2001-06-162001-04-01 Neal H Walfield <neal@cs.uml.edu>Roland McGrath
* main.c (S_exec_init): Use iohelp_create_empty_iouser.
2001-02-12auth/Marcus Brinkmann
2001-02-12 Marcus Brinkmann <marcus@gnu.org> * auth.c (main): New variable ARGP defining a doc string. Pass address of ARGP to argp_parse(). exec/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * main.c: Change hurd version name from proc to exec. (main): Add period to doc string. ftpfs/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * ftpfs.c: Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. hostmux/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * hostmux.c: Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. usermux/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * usermux.c (options): Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. trans/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * fifo.c: Make version string say `fifo', not `null'. Add period to doc text in ARGP. * firmlink.c: Add period to doc text in ARGP_DOC, convert semi-colon to colon. * magic.c (options): Add period to DOC. * new-fifo.c (fifo_trans_parse_args): Add doc string to ARGP. Include <version.h>, new global variable ARGP_PROGRAM_VERSION. * crash.c: Include <version.h>, add global variable ARGP_PROGRAM_VERSION. * hello.c: Include <version.h>, add global variable ARGP_PROGRAM_VERSION. (hello_argp): Add doc string. * hello-mt.c: Likewise. * streamio.c: Add period to DOC. Change streamdev to streamio in version string. * password.c (main): Add period to doc string in ARGP.
2000-03-202000-03-20 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* main.c (trivfs_allow_open): Initialize to zero. (trivfs_support_read, trivfs_support_write): Likewise. (trivfs_support_exec): Variable removed.
2000-03-172000-03-17 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* main.c (S_exec_init): Don't use MOVE_SEND in Hurd RPC.
1999-07-101999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* exec.c (check_elf): Call elf_machine_matches_host instead of comparing against elf_machine. (load_section): #if 0 out no-op code that uses elf_machine. * priv.h (elf_machine_matches_host): Declare it. (elf_machine, mach_host_elf_machine): Remove decls. * main.c (main) [!BFD]: Don't call mach_host_elf_machine. (elf_machine): Variable removed.
1999-07-031999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* core.c (core_dump_task): Use munmap instead of vm_deallocate, when it's from our own task. * elfcore.c: Likewise. * exec.c (load_section): Likewise. (map): Likewise. (close_exec_stream): Likewise. (finish_mapping): Likewise. (load): Likewise. (do_exec): Likewise. (S_exec_setexecdata): Likewise. * hashexec.c (check_hashbang): Likewise. * main.c (deadboot): Likewise.
1998-12-301998-12-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* main.c (S_exec_init): Deallocate PROCSERVER port when finished.
1998-12-271998-12-27 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* main.c (S_exec_init): Remove variable DEV_MASTER; pass null instead since we don't need it. Use assert_perror on getting the host-priv port and on startup_essential_task, since init will hang until we've done made that RPC. 1998-12-21 Roland McGrath <roland@baalperazim.frob.com> * main.c (S_exec_init): Don't call set_active_trans. (set_active_trans): Function removed.
1998-11-291998-11-25 Mark Kettenis <kettenis@phys.uva.nl>Roland McGrath
* main.c (S_exec_init): Call _hurd_proc_init with new args set to zero.
1997-08-20Wed Aug 20 14:02:11 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* main.c (main): New args for ports_manage_port_operations_multithread.
1997-06-30(main):Miles Bader
Arg parsing added. (argp_program_version): New variable. Include <argp.h>.
1996-11-18Mon Nov 18 17:45:48 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* exec.c (load_section): If ANYWHERE, then make sure ADDR starts out at least past the first page, so that we don't take it. Then the library can (if desired) make the page no-access. Fri Nov 15 17:34:23 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * exec.c: Don't include <hurd/shared.h> any more. * main.c (S_exec_init): New arg syntax of trivfs_open.
1996-09-05*** empty log message ***Thomas Bushnell
1996-08-29*** empty log message ***Thomas Bushnell
1996-05-06(exec_version): Upgrade to 0.0.Michael I. Bushnell
1995-11-21(going_down): Variable removed.Roland McGrath
(deadboot): Don't test it. Instead, use ports calls to check if there are no other live ports. (trivfs_goaway): Don't set it.
1995-11-06(main): Add FLAGS arg to trivfs_startup call.Miles Bader
1995-10-25(exec_demuxer): Call exec_startup_server.Roland McGrath
1995-10-11Initial revisionRoland McGrath