]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: Detect Windows Subsystem for Linux
authorStanislav Brabec <sbrabec@suse.cz>
Mon, 30 Jan 2017 16:01:50 +0000 (17:01 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 21 Feb 2017 12:14:24 +0000 (13:14 +0100)
commit3673936f84bcf0b3ac5bff37394180bed7d692d2
treef1e9be4e414a526cad14256618e77d87aca9aa8b
parentfb6ce9b0fb5552b7658f2c8bcdd3c438e30c6626
lscpu: Detect Windows Subsystem for Linux

Windows 10 implements Windows Subsystem for Linux (WSL).

WSL does not implement support for SIGSEGV handler, which is used inside
is_vmware_platform(). As a result, lscpu crashes there.

Implement WSL detection, and as a side effect, work around the crash.
Note that none of existing virtualization types exactly matches.
But the the closest would be "container".

References:

Provide a way to positively detect WSL from an app compiled on Linux.
https://github.com/Microsoft/BashOnWindows/issues/423

missing support for SIGSEGV handler
https://github.com/Microsoft/BashOnWindows/issues/1637

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
sys-utils/lscpu.c
sys-utils/lscpu.h