Ninjatrappeur's systemd working tree
Go to file
Lennart Poettering 38a03f06a7 sd-event: make sure sd_event_now() cannot fail
Previously, if the event loop never ran before sd_event_now() would
fail. With this change it will instead fall back to invoking now(). This
way, the function cannot fail anymore, except for programming error when
invoking it with wrong parameters.

This takes into account the fact that many callers did not handle the
error condition correctly, and if the callers did, then they kept simply
invoking now() as fall back on their own. Hence let's shorten the code
using this call, and make things more robust, and let's just fall back
to now() internally.

Whether now() is used or the cache timestamp may still be detected via
the return value of sd_event_now(). If > 0 is returned, then the fall
back to now() was used, if == 0 is returned, then the cached value was
returned.

This patch also simplifies many of the invocations of sd_event_now():
the manual fall back to now() can be removed. Also, in cases where the
call is invoked withing void functions we can now protect the invocation
via assert_se(), acknowledging the fact that the call cannot fail
anymore except for programming errors with the parameters.

This change is inspired by #841.
2015-08-03 17:34:49 +02:00
catalog l10n: Add Belarusian translation 2015-06-15 00:13:43 +03:00
docs docs: add .gitignore 2015-07-06 17:47:38 +02:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: add resolution information for Dell Vostro 1510 touchpad 2015-08-01 20:03:51 +12:00
m4 remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
man man: fix typo in systemd-fsck@ 2015-08-02 22:22:44 +02:00
network network: fix 'LinkLocal' -> 'LinkLocalAddressing' in network files 2015-02-14 15:31:26 +01:00
po po: run make update-po 2015-06-19 12:47:39 +02:00
rules rules: block - add dasd to whitelist 2015-07-05 16:22:30 +02:00
shell-completion zsh-completion: _loginctl/_systemd/_systemd-inhibit improvements 2015-06-22 18:07:32 -04:00
src sd-event: make sure sd_event_now() cannot fail 2015-08-03 17:34:49 +02:00
sysctl.d sysctl: add some hints how to override settings 2015-02-26 19:07:38 -05:00
system-preset preset: enable machines.target by default 2014-12-29 17:36:57 +01:00
sysusers.d turn kdbus support into a runtime option 2015-06-17 18:01:49 +02:00
test sysv-generator test: Fix random ordering failure 2015-07-01 07:34:23 +02:00
tmpfiles.d tmpfiles: don't recursively descend into journal directories in /var 2015-07-09 18:46:01 -03:00
tools terminal: drop unfinished code 2015-07-27 20:15:34 +02:00
units terminal: drop unfinished code 2015-07-27 20:15:34 +02:00
xorg push xorg information to the systemd --user instance 2015-01-09 21:39:31 +01:00
.dir-locals.el Keep emacs configuration in one configuration file. 2011-03-08 01:53:46 +01:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore test: add test for static lists 2015-07-31 19:58:27 +02:00
.mailmap prepare NEWS 2014-02-18 02:51:47 +01:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: disable -fdiagnostics-color output 2013-10-20 04:29:39 +02:00
.ycm_extra_conf.py ycm: update flag blacklist 2014-06-04 15:41:10 -04:00
CODING_STYLE CODING_STYLE: say that "for (;;)" is better than "while (1)" 2015-07-31 20:00:07 +02:00
DISTRO_PORTING build-sys: warn if people don't change the default NTP servers when building systemd 2015-07-11 14:24:29 -03:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile-man.am gpt-auto-generator: merge efi-boot-generator 2015-07-29 18:16:48 +02:00
Makefile.am test: add test for static lists 2015-07-31 19:58:27 +02:00
NEWS NEWS: update 2015-07-31 18:21:19 +02:00
README Merge pull request #554 from poettering/ntp-pool 2015-07-12 11:43:51 +02:00
README.md README.md: add Coverity scan status badge 2015-06-08 13:26:54 +02:00
TODO TODO 2015-07-28 00:07:32 +02:00
autogen.sh terminal: drop unfinished code 2015-07-27 20:15:34 +02:00
configure.ac build: bump version to 224 2015-07-31 18:13:57 +02:00

README.md

systemd - System and Service Manager

Build Status
Coverity Scan Status

Details

  • General information about systemd can be found in the systemd Wiki
  • Information about build requirements are provided in the README file