summaryrefslogtreecommitdiff
path: root/src/basic/terminal-util.c
Commit message (Collapse)AuthorAge
...
* core: inherit TERM from PID 1 for all services started on /dev/consoleLennart Poettering2017-07-05
| | | | | | | This way, invoking nspawn from a shell in the best case inherits the TERM setting all the way down into the login shell spawned in the container. Fixes: #3697
* elogind: ignore lack of tty when checking whether colors should be enabledZbigniew Jędrzejewski-Szmek2017-06-19
| | | | | | | | | | | | | When started by the kernel, we are connected to the console, and we'll set TERM properly to some value in fixup_environment(). We'll then enable or disable colors based on the value of $SYSTEMD_COLORS and $TERM. When reexecuting, TERM should be already set, so we can use this value. Effectively, behaviour is the same as before affd7ed1a was reverted, but instead of reopening the console before configuring color output, we just ignore what stdout is connected to and decide based on the variables only. (cherry picked from commit 158fbf7661912adf0f42c93155499119811dde82)
* Prep v231: Apply missing fixes from upstream (1/6) src/basicSven Eden2017-06-16
|
* treewide: use stdio_unset_cloexec() functionAlexander Kuleshov2017-06-16
|
* tree-wide: check colors_enabled() before outputting ANSI color stringsLennart Poettering2017-06-16
|
* ask-password: ask for passphrases not only on the first console of /dev/consoleWerner Fink2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | but also on all other consoles. This does help on e.g. mainframes where often a serial console together with other consoles are used. Even rack based servers attachted to both a serial console as well as having a virtual console do sometimes miss a connected monitor. To be able to ask on all terminal devices of /dev/console the devices are collected. If more than one device are found, then on each of the terminals a inquiring task for passphrase is forked and do not return to the caller. Every task has its own session and its own controlling terminal. If one of the tasks does handle a password, the remaining tasks will be terminated. Also let contradictory options on the command of elogind-tty-ask-password-agent fail. Spwan for each device of the system console /dev/console a own process. Replace the system call wait() with with system call waitid(). Use SIGTERM instead of SIGHUP to get unresponsive childs down. Port the collect_consoles() function forward to a pulbic and strv based function "get_kernel_consoles()" in terminal-util.c and use this in tty-ask-password-agent.c.
* Prep v230: Add utmp support to make wall message to work properly.Sven Eden2017-06-16
|
* Prep v230: Apply missing upstream fixes and updates (2/8) src/basic.Sven Eden2017-06-16
|
* Prep v229: Add missing fixes from upstream [1/6] src/basicSven Eden2017-05-17
|
* tree-wide: check if errno is greater then zeroZbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | | | gcc is confused by the common idiom of return errno ? -errno : -ESOMETHING and thinks a positive value may be returned. Replace this condition with errno > 0 to help gcc and avoid many spurious warnings. I filed a gcc rfe a long time ago, but it hard to say if it will ever be implemented [1]. Both conventions were used in the codebase, this change makes things more consistent. This is a follow up to bcb161b0230f. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61846
* Prep v228: Condense elogind source masks (3/5)Sven Eden2017-04-26
|
* Prep v228: Clean up the new src/basic/*-util-[hc] files:Sven Eden2017-04-26
| | | | | | | | | | | | | - src/basic/capability-util.[hc] - src/basic/cgroup-util.[hc] - src/basic/fd-util.[hc] - src/basic/fs-util.[hc] - src/basic/memfd-util.[hc] - src/basic/path-util.[hc] - src/basic/socket-util.[hc] - src/basic/terminal-util.[hc] - src/basic/user-util.[hc] - src/basic/xattr-util.[hc]
* Prep v228: Add remaining updates from upstream (2/3)Sven Eden2017-04-26
| | | | | Apply remaining fixes and the performed move of utility functions into their own foo-util.[hc] files on libbasic.
* util: minor modernization of vt_disallocate()Lennart Poettering2017-04-26
|
* [2/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* Prep v226: Mask all unneeded functionsSven Eden2017-03-14
|
* Prep v226: Apply missing fixes and changes to src/basicSven Eden2017-03-14
|
* Prep v225: Applying various fixes and changes to src/basic that got lost ↵Sven Eden2017-03-14
| | | | during git am transfer.
* terminal-util: no real reason to assert on O_CREATLennart Poettering2017-03-14
| | | | That's just handle this as a normal error.
* terminal-util: when resetting terminals, don't wait for carrierLennart Poettering2017-03-14
| | | | | | | | | | | | In case of non-CLOCAL lines (i.e. those with carrier detect configured) we shouldnt wait for a carrier if all we try to do is reset the TTY. Hence, whenever we open such a TTY pass O_NONBLOCK. Note that we continue to open ttys we intend to write to without O_ONBLOCK, we only add it in cases we invoke ioctl()s or other terminal operations without reading or writing to the device. Fixes #835.
* Prep v224: Major cleanup of unneeded functions and some source files.Sven Eden2017-03-14
|
* Prep v221: Update and clean up build system to sync with upstreamSven Eden2017-03-14
This commit replays the moving around of source files that have been done between systemd-219 and systemd-221. Further the Makefile.am is synchronized with the upstream version and then "re-cleaned". A lot of functions, that are not used anywhere in elogind have been coated into #if 0/#endif directives to further shorten the list of dependencies. All unneeded files have been removed.