summaryrefslogtreecommitdiff
path: root/src/login/inhibit.c
Commit message (Collapse)AuthorAge
* [4/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* Add support for building elogind against musl libcSven Eden2017-03-14
| | | | | | | | | | | | | | | | | | | * Check whether printf.h is available and define/undef HAVE_PRINTF_H accordingly. * Added src/shared/parse-printf-format.[hc] by Emil Renner Berthing <systemd@esmil.dk> that provides parse_printf_format() if printf.h is unavailable * Added src/basic/musl_missing.h by Juergen Buchmueller <pullmoll@t-online.de> that implements glibc functions missing in musl libc as macros. * Extended src/basic/musl_missing.h and added src/basic/musl_missing.c providing - program_invocation_name - program_invocation_short_name and - elogind_set_program_name() to set the two where appropriate. * Added calls to elogind_set_program_name() to all main() functions where needed. * A few other fixes to work nicely with musl libc.
* sd-bus: introduce new sd_bus_flush_close_unref() callLennart Poettering2017-03-14
| | | | | | | | | | | | | | | | sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush() (which writes all unwritten messages out) + sd_bus_close() (which terminates the connection, releasing all unread messages) + sd_bus_unref() (which frees the connection). The combination of this call is used pretty frequently in systemd tools right before exiting, and should also be relevant for most external clients, and is hence useful to cover in a call of its own. Previously the combination of the three calls was already done in the _cleanup_bus_close_unref_ macro, but this was only available internally. Also see #327
* tree-wide: whenever we fork off a foreign child process reset signal ↵Lennart Poettering2017-03-14
| | | | | | | | | | mask/handlers Also, when the child is potentially long-running make sure to set a death signal. Also, ignore the result of the reset operations explicitly by casting them to (void).
* shared: add formats-util.hRonny Chevalier2017-03-14
|
* shared: add process-util.[ch]Ronny Chevalier2017-03-14
|
* login: fix copy-pasto in error pathZbigniew Jędrzejewski-Szmek2015-03-07
| | | | CID #1256583.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* delta: diff returns 1 when files differ, ignore thisZbigniew Jędrzejewski-Szmek2014-11-29
| | | | https://bugs.debian/org/771397
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-28
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-28
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-28
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* busctl: add "tree" command to explore object treesLennart Poettering2014-11-10
|
* inhibit: allow filtering --list by modeMantas Mikulėnas2014-11-10
| | | | | Usually there are a few delay inhibitors all the time (NetworkManager, Telepathy, etc.), but I'm only interested in the block ones.
* bus: always explicitly close bus from main programsLennart Poettering2014-08-04
| | | | | | | | | | | | | | Since b5eca3a2059f9399d1dc52cbcf9698674c4b1cf0 we don't attempt to GC busses anymore when unsent messages remain that keep their reference, when they otherwise are not referenced anymore. This means that if we explicitly want connections to go away, we need to close them. With this change we will no do so explicitly wherver we connect to the bus from a main program (and thus know when the bus connection should go away), or when we create a private bus connection, that really should go away after our use. This fixes connection leaks in the NSS and PAM modules.
* Unify parse_argv styleZbigniew Jędrzejewski-Szmek2014-08-03
| | | | | | | | | | | | | | | | getopt is usually good at printing out a nice error message when commandline options are invalid. It distinguishes between an unknown option and a known option with a missing arg. It is better to let it do its job and not use opterr=0 unless we actually want to suppress messages. So remove opterr=0 in the few places where it wasn't really useful. When an error in options is encountered, we should not print a lengthy help() and overwhelm the user, when we know precisely what is wrong with the commandline. In addition, since help() prints to stdout, it should not be used except when requested with -h or --help. Also, simplify things here and there.
* Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek2014-05-15
| | | | No functional change expected :)
* replace more dup() by F_DUPFD_CLOEXECLennart Poettering2014-05-13
|
* bus: introduce concept of a default bus for each thread and make use of it ↵Lennart Poettering2013-11-12
| | | | | | | | everywhere We want to emphasize bus connections as per-thread communication primitives, hence introduce a concept of a per-thread default bus, and make use of it everywhere.
* inhibit: more conversions to use bus_log_parse_error()Lennart Poettering2013-11-07
|
* bus: log message parsing errors everywhere with a generalized ↵Lennart Poettering2013-11-07
| | | | bus_log_parse_error()
* clients: unify how we invoke getopt_long()Lennart Poettering2013-11-06
| | | | | Among other things this makes sure we always expose a --version command and show it in the help texts.
* inhibit: don't return error code on --helpLennart Poettering2013-11-06
|
* general: various cleanupsLennart Poettering2013-10-30
|
* inhibit: port to sd-busTom Gundersen2013-10-22
|
* inhbit: show comm field of inhibiting processesLennart Poettering2013-04-24
|
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* Move bus_error to dbus-common and remove bus_error_message_or_strerrorSimon Peeters2013-04-18
| | | | | bus_error and bus_error_message_or_strerror dit almost exactly the same, so use only one of them and place it in dbus-common.
* logind: exploit previous cleanups and simplify returnsZbigniew Jędrzejewski-Szmek2013-03-18
|
* logind: Make more use of cleanup macrosColin Walters2013-03-18
|
* inhibit: print --list if no argument is givenKay Sievers2013-03-05
|
* inhibit: make the output more readableMantas Mikulėnas2013-03-01
| | | | | | | | | | | | | The columnar output can become pretty horrible. When GNOME inhibits power/suspend/hibernate keys, the "WHAT" column's text extends to "WHO" and even "WHY". At the same time, all texts in "WHY" are of the form GNOME handlin...sses Receiving sle...ions GNOME needs t...reen This patch splits each inhibit entry into four lines, allowing the full text to fit in a normal-width terminal.
* build-sys: drop all distribution specfic checksLennart Poettering2013-01-04
| | | | Yay, we now have a completely generic systemd. No distribution specific checks anymore!
* man: handle-sleep-key is invalid, replace it with handle-suspend-key and ↵Сковорода Никита Андреевич2012-10-03
| | | | handle-hibernate-key in systemd-inhibit help and man.
* man: document new inhibitor typesLennart Poettering2012-09-19
|
* inhibit: close all fds when invoking inhibited toolLennart Poettering2012-09-10
|
* dbus: minor coding style fixesLennart Poettering2012-09-10
|
* Make systemd-inhibit --list workMatthias Clasen2012-09-10
| | | | | | The code in the print_inhibitors function had an unintended unconditional early exit, causing it to never print any inhibitors.
* logind: use bus_method_call_with_reply() where posibleSimon Peeters2012-08-08
|
* logind: use "sleep" as generic term for "suspend", "hibernate", and later on ↵Lennart Poettering2012-05-08
| | | | "hybrid suspend"
* logind: implement delay inhibitor locks in addition to block inhibitor locksLennart Poettering2012-05-05
This is useful to allow applications to synchronously save data before the system is suspended or shut down.