summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2015-03-13 17:47:28 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-03-15 20:42:42 -0400
commit8931278c8a9ef7b60f6b6963486a9e9febb20a0d (patch)
tree3f4cf22a348cd66775c1ea89ed463928b5b7fb90 /man
parent301f4073fe1c2757e602aef24cee9ccf5f81a3a3 (diff)
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.
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions