1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
systemd/src
Lennart Poettering ae3dde8012 machinectl: fix race when opening new shells with "machinectl shell"
Previously, we'd allocate the TTY, spawn a service on it, but
immediately start processing the TTY and forwarding it to whatever the
commnd was started on. This is however problematic, as the TTY might get
actually opened only much later by the service. We'll hence first get
EIOs on the master as the other side is still closed, and hence
considered it hung up and terminated the session.

With this change we add a flag to the pty forwarding logic:
PTY_FORWARD_IGNORE_INITIAL_VHANGUP. If set, we'll ignore all hangups
(i.e. EIOs) on the master PTY until the first byte is successfully read.
From that point on we consider a hangup/EIO a regular connection termination. This
way, we handle the race: when we get EIO initially we'll ignore it,
until the connection is properly set up, at which time we start
honouring it.
2015-10-07 20:10:48 +02:00
..
ac-power
activate activate: validate fdname when accepting it 2015-10-06 12:32:31 +02:00
analyze analyze: trivial code cleanups 2015-10-07 15:45:39 +02:00
ask-password ask-password: add support for caching passwords in the kernel keyring 2015-10-07 12:26:14 +02:00
backlight fileio: consolidate write_string_file*() 2015-07-06 19:19:25 -04:00
basic util: always enforce O_NOCTTY and O_CLOEXEC in openpt_in_namespace() 2015-10-07 20:08:49 +02:00
binfmt util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
boot util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
bootchart bootchart: use get_proc_field and PROC_CPUINFO_MODEL 2015-09-30 15:57:55 +03:00
bus-proxyd util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
cgls bus-util: rename bus_open_transport() to bus_connect_transport() 2015-09-29 21:55:52 +02:00
cgroups-agent bus-util: rename bus_open_transport() to bus_connect_transport() 2015-09-29 21:55:52 +02:00
cgtop bus-util: rename bus_open_transport() to bus_connect_transport() 2015-09-29 21:55:52 +02:00
compat-libs
core Merge pull request #1484 from poettering/ask-pass-kernel-keyring 2015-10-07 15:32:42 +02:00
cryptsetup ask-password: add support for caching passwords in the kernel keyring 2015-10-07 12:26:14 +02:00
dbus1-generator util: introduce safe_fclose() and port everything over to it 2015-09-09 15:26:11 +02:00
debug-generator tree-wide: update empty-if coccinelle script to cover empty-while and more 2015-09-09 14:59:51 +02:00
delta util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
detect-virt detect-virt: various modernizations 2015-09-29 21:55:51 +02:00
escape util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
firstboot ask-password: add support for caching passwords in the kernel keyring 2015-10-07 12:26:14 +02:00
fsck Merge pull request #1394 from steelman/fsck-force-reboot 2015-09-30 15:39:29 +02:00
fstab-generator basic: rework virtualization detection API 2015-09-07 13:42:47 +02:00
getty-generator basic: rework virtualization detection API 2015-09-07 13:42:47 +02:00
gpt-auto-generator gpt-auto-generator: fix duplicate backing partition check 2015-10-06 09:41:02 +02:00
hibernate-resume fileio: consolidate write_string_file*() 2015-07-06 19:19:25 -04:00
hostname bus-util: rename bus_open_transport() to bus_connect_transport() 2015-09-29 21:55:52 +02:00
hwdb util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
import import: hash URL in paths if they are too long 2015-10-07 14:06:49 +02:00
initctl bus-util: rename bus_open_transport() to bus_connect_transport() 2015-09-29 21:55:52 +02:00
journal siphash24: unify API 2015-10-06 17:47:00 +02:00
journal-remote Merge pull request #1406 from blaskovic/journal-remote-typo 2015-10-05 23:24:09 +02:00
kernel-install 90-loaderentry.install: fixup BOOT_OPTIONS 2015-06-02 16:10:06 +02:00
libsystemd build-sys: add sd_listen_fds_with_name() to .sym file 2015-10-07 17:04:39 +02:00
libsystemd-network siphash24: unify API 2015-10-06 17:47:00 +02:00
libudev tree-wide: use coccinelle to patch a lot of code to use mfree() 2015-09-09 08:19:27 +02:00
locale bus-util: rename bus_open_transport() to bus_connect_transport() 2015-09-29 21:55:52 +02:00
login logind: remove warn_melody() logic 2015-10-01 21:11:12 +02:00
machine machinectl: fix race when opening new shells with "machinectl shell" 2015-10-07 20:10:48 +02:00
machine-id-setup machine-id-commit: merge machine-id-commit functionality into machine-id-setup 2015-09-29 21:55:51 +02:00
modules-load ask-password: add support for caching passwords in the kernel keyring 2015-10-07 12:26:14 +02:00
network Merge pull request #1459 from ssahani/bridge1 2015-10-05 22:44:38 +02:00
notify util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
nspawn machinectl: fix race when opening new shells with "machinectl shell" 2015-10-07 20:10:48 +02:00
nss-myhostname hostname-util: introduce new is_gateway_hostname() call 2015-08-21 12:07:13 +02:00
nss-mymachines util: drop UID_IS_INVALID() in favour of uid_is_valid() 2015-09-22 16:31:32 +02:00
nss-resolve resolved: rework synthesizing logic 2015-08-21 12:41:08 +02:00
path util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
quotacheck tree-wide: whenever we fork off a foreign child process reset signal mask/handlers 2015-06-10 01:28:58 +02:00
random-seed tree-wide: drop {} from one-line if blocks 2015-09-09 08:20:20 +02:00
rc-local-generator
remount-fs tree-wide: whenever we fork off a foreign child process reset signal mask/handlers 2015-06-10 01:28:58 +02:00
reply-password
resolve hashmap: refactor hash_func 2015-10-05 18:22:10 +02:00
resolve-host util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
rfkill rfkill: rework and make it listen on /dev/rfkill 2015-10-01 16:21:09 +02:00
run machinectl: fix race when opening new shells with "machinectl shell" 2015-10-07 20:10:48 +02:00
shared machinectl: fix race when opening new shells with "machinectl shell" 2015-10-07 20:10:48 +02:00
sleep util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
socket-proxy util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
sysctl util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
system-update-generator
systemctl systemctl: fix how we decode types and states 2015-10-01 14:27:20 +02:00
systemd core: add support for naming file descriptors passed using socket activation 2015-10-06 11:52:48 +02:00
sysusers smack: label /etc/passwd and friends as '_' smack label when --with-smack-run-label' is enabled 2015-10-07 16:37:25 +09:00
sysv-generator util: add safe_closedir() similar to safe_fclose() 2015-09-22 16:30:24 +02:00
test Merge pull request #1484 from poettering/ask-pass-kernel-keyring 2015-10-07 15:32:42 +02:00
timedate bus-util: rename bus_open_transport() to bus_connect_transport() 2015-09-29 21:55:52 +02:00
timesync tree-wide: clean up log_syntax() usage 2015-09-30 22:26:16 +02:00
tmpfiles util: introduce common version() implementation and use it everywhere 2015-09-29 21:08:37 +02:00
tty-ask-password-agent ask-password: add support for caching passwords in the kernel keyring 2015-10-07 12:26:14 +02:00
udev document ability to disable MACAddressPolicy 2015-10-05 15:55:25 -07:00
update-done update-done: ignore nanosecond file timestamp components, they are not reliable 2015-04-27 17:25:57 +02:00
update-utmp update-utmp: flush and close the bus used for connections after use 2015-09-29 21:55:52 +02:00
user-sessions tree-wide: drop {} from one-line if blocks 2015-09-09 08:20:20 +02:00
vconsole basic: rework virtualization detection API 2015-09-07 13:42:47 +02:00
.gitignore
Makefile