aboutsummaryrefslogtreecommitdiff
path: root/daemons
Commit message (Collapse)AuthorAgeFilesLines
* Modernize code by removing use of old style definitions.Flavio Cruz2023-04-032-2/+2
| | | | | Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
* getty: Fix fd leak on errorSamuel Thibault2023-01-011-1/+3
|
* Do not hardcode /libexec libexecdirSamuel Thibault2021-03-162-2/+161
| | | | | | | | | | | | | | | | So that distributions can use the --libexecdir configure parameter. * configure.ac (AC_CONFIG_FILES): Add daemons/runsystem.hurd.sh. * config/ttys: Rename to ttys.in, replace /libexec with @libexecdir@. * config/Makefile (ttys): Generate from ttys.in * daemons/runsystem.hurd.sh.in (prefix): Define to @prefix@. (exec_prefix): Define to @exec_prefix@. (RUNCOM, RUNTTYS): Replace /libexec with @libexecdir@. * init/Makefile (init-CPPFLAGS): Define LIBEXECDIR. * init/init.c (main): Use LIBEXECDIR instead of hardcoding /libexec. * startup/Makefile (startup-CPPFLAGS): Define LIBEXECDIR. * startup/startup.c (start_child, launch_something): Use LIBEXECDIR instead of hardcoding /libexec.
* console-run: do not complain when running with empty /devSamuel Thibault2018-06-031-1/+4
| | | | | * daemons/console-run.c (open_console): Do not complain if errno is ENOENT on opening /dev/console.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-052-5/+5
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* Fix installing runsystem.hurdSamuel Thibault2016-09-042-3/+4
| | | | | | | * daemons/runsystem.hurd: Rename to daemons/runsystem.hurd.sh * daemons/Makefile (targets): Add runsystem.hurd (special-targets): Likewise. (runsystem.hurd): New rule, simply depends on runsystem.hurd.sh
* Add missing libraries to fix link errorsFlavio Cruz2015-12-301-1/+2
| | | | | | | | | | | | | | This fixes several linking problems I had in my recent cross-compilation of the Hurd. I added missing static libraries and also organized some of the targets for more concise rules. * console-client/Makefile: Add libiohelp.a and libihash.a. * daemons/Makefile: Add libihash.a and libshouldbeinlibc.a. * devnode/Makefile: Add iohelp and ihash to HURDLIBS. * random/Makefile: Likewise. * trans/Makefile: Reorder targets alphabetically and add libiohelp.a and libihash.a. * utils/Makefile: Add libihash.a.
* fix compiler warnings in hurd/daemonsFlavio Cruz2015-12-291-1/+1
| | | | | | daemons: Fix compiler warnings. * daemons/lmail.c: Initialize cached to 0.
* Fix race condition in ext2fs when remountingJames Clarke2015-09-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems, ext2fs.static would regularly hang at startup, as a race condition meant it would process paging requests while remounting. To fix this, libpager has been altered to allow inhibiting and resuming its worker threads, and ext2fs uses this to inhibit paging while remounting. * console/pager.c (pager_requests): New variable. (user_pager_init): Updated call to pager_start_workers to use new pager_requests variable. * daemons/runsystem.sh: Removed artificial delay working around the race condition. * ext2fs/ext2fs.c (diskfs_reload_global_state): Call new inhibit_ext2_pager and resume_ext2_pager functions, and leave sblock as non-NULL so it will be munmapped. * ext2fs/ext2fs.h (inhibit_ext2_pager,resume_ext2_pager): New functions. * ext2fs/pager.c (file_pager_requests): New variable. (create_disk_pager): Updated call to pager_start_workers to use new file_pager_requests variable. (inhibit_ext2_pager,resume_ext2_pager): New functions. * fatfs/fatfs.h (inhibit_fat_pager,resume_fat_pager): New functions. * fatfs/pager.c (file_pager_requests): New variable. (create_fat_pager): Updated call to pager_start_workers to use new file_pager_requests variable. (inhibit_fat_pager,resume_fat_pager): New functions. * libdiskfs/disk-pager.c (diskfs_disk_pager_requests): New variable. (diskfs_start_disk_pager): Updated call to pager_start_workers to use new diskfs_disk_pager_requests variable. * libdiskfs/diskfs-pager.h (diskfs_disk_pager_requests): New variable. * libpager/demuxer.c (struct pager_requests): Renamed struct requests to struct pager_requests. Replaced queue with queue_in and queue_out pointers. Added inhibit_wakeup field. (pager_demuxer): Updated to use new queue_in/queue_out pointers. Only wake up workers if not inhibited. (worker_func): Updated to use new queue_in/queue_out pointers. Final worker thread to sleep notifies the inhibit_wakeup condition variable. (pager_start_workers): Added out parameter for the requests instance. Allocate heap space shared by both queues. Initialise new inhibit_wakeup condition. (pager_inhibit_workers,pager_resume_workers): New functions. * libpager/pager.h (struct pager_requests): Public forward definition. (pager_start_workers): Added out parameter for the requests instance. (pager_inhibit_workers,pager_resume_workers): New functions. * libpager/queue.h (queue_empty): New function. * storeio/pager.c (pager_requests): New variable. (init_dev_paging): Updated call to pager_start_workers to use new pager_requests variable.
* misc: Fix typos in comments (found by codespell)Stefan Weil2015-01-031-1/+1
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* init: add a minimalist init programJustus Winter2014-11-214-58/+184
| | | | | | | | | | | | | | | | | | | | | | This patch adds a minimalist init program. It is somewhat lacking in features, but is able to bring up a Hurd system with the runsystem and rc scripts. In fact, it roughly does what the former /hurd/init did, modulo all the very early bootstrapping stuff and the startup protocol. It is started when all the essential servers are up and running, so it can make use of most of the POSIX goodies, making its implementation much simpler. * Makefile (prog-subdirs): Add init. * daemons/runsystem.sh: Generalize runsystem so that it can start any init as specified on the kernel command line. By default, it starts /hurd/init. * daemons/runsystem.hurd: This is a verbatim copy of runsystem.sh. It is started by /hurd/init. * daemons/rc.sh: Do not start /hurd/mach-defpager as it is already started in runsystem.sh. * daemons/Makefile (SRCS): Add runsystem.hurd. * init/Makefile: New file. * init/init.c: Likewise.
* daemons/getty: always print a newline before the bannerJustus Winter2014-02-051-1/+2
| | | | | * daemons/getty.c (load_banner): Drop first newline from default banner. (print_banner): Print a newline.
* daemons/getty: display /etc/issue if availableJustus Winter2014-01-311-7/+79
| | | | | | | | | | Previously, a banner was hardcoded in Hurds getty. Load /etc/issue instead. Fall back to a hardcoded version if that fails. Expand common \char sequences. If no /etc/issue is provided, the old behavior is retained. * daemons/getty.c (load_banner): New function. (print_banner): Expand \char sequences.
* Make boot script accept more fsck valuesSamuel Thibault2013-10-281-1/+1
| | | | * daemons/rc.sh: Accept fsck returning 5 and 9 too.
* Make boot script reboot when fsck told soSamuel Thibault2013-10-221-1/+6
| | | | * daemons/rc.sh: When fsck returned 2 or 3, reboot the system.
* daemons: make sure / is writable before setting up pflocalJustus Winter2013-09-191-4/+11
| | | | | | | | | runsystem.sh checks whether /servers/socket/1 exists and creates it using settrans -c if it does not. But at this point in the boot the root filesystem is normally not writable. This patch fixes this. * daemons/runsystem.sh: Make sure / is writable before attempting to set up pflocal.
* daemons: fix setsid(2) in console-runJustus Winter2013-08-291-2/+3
| | | | | | Only run setsid(2) if the process is not already the group leader. * daemons/console-run.c (open_console): Fix setsid(2).
* Automatically setup local sockets if not already done so.Samuel Thibault2012-09-231-0/+6
| | | | | | | Needed early for shell pipelines. * daemons/runsystem.sh: See whether pflocal is setup already, and do so if not (install case)
* Check that runsystem script exists before trying it.Samuel Thibault2012-09-221-0/+7
| | | | | | | * init/init.c (launch_something): Check with file_name_lookup that runsystem script exists before calling start_child. * daemons/console-run.c (main): Check with file_name_lookup that runsystem script exists before opening a console for it.
* console-run: Create and settrans /dev/console when not already done.Ludovic Courtès2012-04-081-6/+12
| | | | | | | | | | | | This patch makes sure /libexec/console-run creates and installs /dev/console on the first run without considering it a failure if it didn't exist already. * daemons/console-run.c (TERMINAL_FIRST_TRY): Change node to `/dev/console'. (TERMINAL_SECOND_TRY): Change node to `/tmp/console'. (open_console): Clear FALLBACK when TRY == 1 and the `file_set_translator' call suceeded.
* fix common misspellingsJonathan Neuschäfer2011-08-202-8/+8
| | | | | | * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* Set default umask to 022Samuel Thibault2011-06-211-0/+2
| | | | * daemons/runsystem.sh: Call umask 022.
* Fix "make dist" in `daemons'.Ludovic Courtès2010-08-011-2/+2
| | | | * daemons/Makefile (SRCS): Add `runsystem.sh'.
* Switch to the new ChangeLog style.Thomas Schwinge2009-07-111-249/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog: Wipe out content, and add instructions about how to get it back. * auth/ChangeLog: Remove file. * benchmarks/ChangeLog: Likewise. * boot/ChangeLog: Likewise. * bsdfsck/ChangeLog: Likewise. * config/ChangeLog: Likewise. * console-client/ChangeLog: Likewise. * console/ChangeLog: Likewise. * daemons/ChangeLog: Likewise. * defpager/ChangeLog: Likewise. * doc/ChangeLog: Likewise. * exec/ChangeLog: Likewise. * ext2fs/ChangeLog: Likewise. * fatfs/ChangeLog: Likewise. * fstests/ChangeLog: Likewise. * ftpfs/ChangeLog: Likewise. * hostmux/ChangeLog: Likewise. * hurd/ChangeLog: Likewise. * include/ChangeLog: Likewise. * init/ChangeLog: Likewise. * isofs/ChangeLog: Likewise. * libcons/ChangeLog: Likewise. * libdirmgt/ChangeLog: Likewise. * libdiskfs/ChangeLog: Likewise. * libfshelp/ChangeLog: Likewise. * libftpconn/ChangeLog: Likewise. * libhurdbugaddr/ChangeLog: Likewise. * libihash/ChangeLog: Likewise. * libiohelp/ChangeLog: Likewise. * libnetfs/ChangeLog: Likewise. * libpager/ChangeLog: Likewise. * libpipe/ChangeLog: Likewise. * libports/ChangeLog: Likewise. * libps/ChangeLog: Likewise. * libshouldbeinlibc/ChangeLog: Likewise. * libstore/ChangeLog: Likewise. * libthreads/ChangeLog: Likewise. * libtrivfs/ChangeLog: Likewise. * login/ChangeLog: Likewise. * mach-defpager/ChangeLog: Likewise. * nfs/ChangeLog: Likewise. * nfsd/ChangeLog: Likewise. * pfinet/ChangeLog: Likewise. * pflocal/ChangeLog: Likewise. * proc/ChangeLog: Likewise. * release/ChangeLog: Likewise. * serverboot/ChangeLog: Likewise. * storeio/ChangeLog: Likewise. * sutils/ChangeLog: Likewise. * term/ChangeLog: Likewise. * tmpfs/ChangeLog: Likewise. * trans/ChangeLog: Likewise. * ufs-fsck/ChangeLog: Likewise. * ufs-utils/ChangeLog: Likewise. * ufs/ChangeLog: Likewise. * usermux/ChangeLog: Likewise. * utils/ChangeLog: Likewise.
* 2008-12-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2008-12-082-2/+6
| | | | * Makefile (HURDLIBS): Add fshelp and ports.
* 2007-12-11 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2007-12-112-3/+10
| | | | | * getty.c (main) <execl>: Correctly specify sentinels to avoid GCC 4.3 warnings.
* 2002-09-15 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2002-09-152-1/+30
| | | | | | * getty.c: Include <termios.h>. (set_speed): New function. (main): Take linespec from argc[1], not argc[2]. Call set_speed.
* *** empty log message ***Neal H. Walfield2002-03-261-0/+4
|
* 2002-03-23 James A. Morrison <ja2morri@uwaterloo.ca>Neal H. Walfield2002-03-261-9/+9
| | | | * console-run.c (open_console): Use ERR, not errno.
* 2001-12-20 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2001-12-202-1/+5
| | | | * runsystem.sh: For now, this requires bash.
* .Roland McGrath2001-11-221-0/+11
|
* 2001-11-21 Roland McGrath <roland@frob.com>Roland McGrath2001-11-221-11/+42
| | | | | | | | | | * runttys.c (setup_terminal, add_terminal, init_ttys): Check for malloc failures. (add_terminal): Fix type used for sizeof calculation in realloc. (init_ttys): Likewise. 2001-11-21 Ryan M Golbeck <rmgolbeck@uwaterloo.ca> * runttys.c (setup_terminal: make_args): Fixed off by one error.
* .Roland McGrath2001-08-201-0/+5
|
* 2001-08-20 Roland McGrath <roland@frob.com>Roland McGrath2001-08-201-8/+2
| | | | | * runsystem.sh: Don't check for MULTIBOOT_CMDLINE environment variable. Instead, expect it as normal arguments from init.
* .Roland McGrath2001-06-081-1/+9
|
* 2001-06-08 Roland McGrath <roland@frob.com>Roland McGrath2001-06-081-0/+7
| | | | * rc.sh: Start /hurd/mach-defpager before swapon.
* 2001-06-07 Roland McGrath <roland@frob.com>Roland McGrath2001-06-081-1/+1
| | | | * rc.sh: Include $? value in message about unexpected fsck exit.
* daemons/Marcus Brinkmann2001-01-302-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * console-run.c (open_console): Conform to new fshelp_start_translator semantics. init/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * init.c (open_console): Conform to new fshelp_start_translator semantics. libfshelp/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * fshelp.h: Add two new parameters to fshelp_open_fn_t: a port to the new task and a cookie. Add a new parameter, cookie, to fshelp_start_translator and fshelp_start_translator_long that will be passed to fshelp_open_fn_t. * fetch-root.c (fshelp_fetch_root): Conform to new fshelp_start_translator_long semantics. * start-translator-long.c (service_fsys_startup): Likewise. (fshelp_start_translator_long): Likewise. * start-translator.c (fshelp_start_translator): Likewise. libtreefs/ Conform to new fshelp_start_translator semantics. trans/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * pump.c (start_pfinet): Conform to new fshelp_start_translator semantics. utils/ 2001-01-17 Neal H Walfield <neal@cs.uml.edu> * mount.c (do_mount): Conform to new fshelp_start_translator semantics. * settrans.c (main): Conform to new fshelp_start_translator semantics therby allowing us to print the pid of the an active translator.
* 1999-09-23 Mark Kettenis <kettenis@gnu.org>Thomas Bushnell1999-09-282-1/+6
| | | | * getty.c (main): Report an error if login_tty failed.
* .Roland McGrath1999-09-221-0/+2
|
* 1999-09-22 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-09-221-3/+0
| | | | * getty.c: Undo last change.
* .Roland McGrath1999-09-221-0/+4
|
* 1999-09-22 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-09-221-0/+4
| | | | * getty.c (main): Make TTY our controlling terminal with TIOCSCTTY.
* 1999-07-20 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-09-191-3/+2
| | | | * getty.c: Include <utmp.h> for login_tty decl.
* .Roland McGrath1999-09-191-1/+10
|
* 1999-09-19 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-09-191-1/+1
| | | | | * runttys.c (main): Only call error if setsid returns -1. From Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>.
* 1999-09-18 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>Thomas Bushnell1999-09-183-2/+7
| | | | | * runttys.c (run): Only call error if setsid returns -1. * console-run.c (open_console): Likewise.
* .Roland McGrath1999-07-111-0/+3
|
* 1999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1999-07-111-6/+3
| | | | | * console-run.c (open_console): Move first setting of TERMINAL and ARGZ_LEN outside of loop, quiets compiler warning.
* .Roland McGrath1999-07-111-0/+4
|