Debian Codegraph @

upstream/debian-unstable/man2/PR_MCE_KILL_SET.2const

raw
1 .\" Copyright 2010, Andi Kleen <[email protected]>
2 .\" Copyright 2012-2015, Michael Kerrisk <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_MCE_KILL_SET 2const 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 PR_MCE_KILL_SET
10 \-
11 set the machine check memory corruption kill policy
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
18 .B #include <sys/prctl.h>
19 .P
20 .BI "int prctl(PR_MCE_KILL, PR_MCE_KILL_SET, long " pol ", 0L, 0L);"
21 .fi
22 .SH DESCRIPTION
23 Use a thread-specific memory corruption kill policy.
24 .P
25 .I pol
26 defines whether the policy is
27 .I early kill
28 .RB ( PR_MCE_KILL_EARLY ),
29 .I late kill
30 .RB ( PR_MCE_KILL_LATE ),
31 or the system-wide default
32 .RB ( PR_MCE_KILL_DEFAULT ).
33 .P
34 Early kill means that the thread receives a
35 .B SIGBUS
36 signal as soon as hardware memory corruption is detected inside
37 its address space.
38 .P
39 In late kill mode, the process is killed only when it accesses a corrupted page.
40 See
41 .BR sigaction (2)
42 for more information on the
43 .B SIGBUS
44 signal.
45 .SH RETURN VALUE
46 On success,
47 0 is returned.
48 On error, \-1 is returned, and
49 .I errno
50 is set to indicate the error.
51 .SH ERRORS
52 .TP
53 .B EINVAL
54 .I pol
55 is not a valid value.
56 .SH STANDARDS
57 Linux.
58 .SH HISTORY
59 Linux 2.6.32.
60 .SH SEE ALSO
61 .BR prctl (2),
62 .BR PR_MCE_KILL (2const)