Systemd/src/vconsole
Lucas De Marchi 8931278c8a vconsole-setup: check error of child process
If we don't check the error of the child process, systemd-vconsole-setup
would exit with 0 even if it could not really setup the console.

For a simple test, move loadkeys elsewhere and execute
systemd-vconsole-setup:

	[root@localhost ~]# strace -f -e execve /usr/lib/systemd/systemd-vconsole-setup
	execve("/usr/lib/systemd/systemd-vconsole-setup", ["/usr/lib/systemd/systemd-vconsol"...], [/* 15 vars */]) = 0
	Process 171 attached
	[pid   171] execve("/usr/bin/loadkeys", ["/usr/bin/loadkeys", "-q", "-C", "/dev/tty0", "br-abnt2"], [/* 15 vars */]) = -1 ENOENT (No such file or directory)
	[pid   171] +++ exited with 1 +++
	--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=171, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
	+++ exited with 0 +++

Note that loadkeys returned 1 while systemd-vconsole-setup return 0.

Since the font and keyboard setup are already serialized, refactor the
code a little bit so the functions do the wait by themselves. One change
in behavior in this patch is that we don't return early, but we do try
to setup the keyboard even if the font load failed.
2015-03-15 20:42:42 -04:00
..
.gitignore vconsole: don't hard-code systemd-vconsole-setup binary path 2014-12-04 00:05:04 +01:00
90-vconsole.rules.in vconsole: match on vtcon events, not fbcon ones 2015-03-06 15:00:40 +01:00
Makefile build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
vconsole-setup.c vconsole-setup: check error of child process 2015-03-15 20:42:42 -04:00