summary refs log tree commit diff
path: root/README
blob: bf5a812d7c97997f18cb00b54f0138401086e62b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FAIL(1)                     General Commands Manual                    FAIL(1)

NAME
     fail – crash in various possible ways

SYNOPSIS
     fail [-123DORabcdikrst]

DESCRIPTION
     fail crashes in various possible ways to help you debug how other
     software reacts to this.

     In addition to the crashes below, fail will also cause a segmentation
     fault when its binary is loaded using dlopen(3) or LD_PRELOAD.

     The options are as follows:

     -1      Return with exit status -1.

     -2      Return with exit status 2.

     -3      Return with exit status 111.

     -D      Create a process that is in uninterruptible sleep (state D) and
             print its pid.  (This uses vfork(2) and pause(2).)

     -O      Allocate memory in an infinite loop, to trigger an out of memory
             situation.  A dot is printed after each 16MB allocation.
             Warning: this may lock up your machine and/or result in killing
             other processes, too.  Use with caution.

     -R      Trigger an infinite recursion that uses alloca(3) heavily (to
             test GCC's -fstack-clash-protection).

     -a      Call abort(3).

     -b      Trigger SIGBUS by accessing mmap(2) memory beyond the end of a
             file.

     -c      Violate a seccomp(2) strict mode restriction.

     -d      Divide by zero.

     -i      Execute an illegal instruction.

     -k      Raise SIGKILL.

     -r      Trigger an infinite recursion that uses less than a page of stack
             per level.

     -s      Trigger a segmentation fault by writing to a null pointer.

     -t      Trigger GCC's __builtin_trap().

EXIT STATUS
     The fail utility never returns 0, because failure is inevitable.

SEE ALSO
     false(1), seccomp(2), abort(3)

AUTHORS
     Leah Neukirchen <leah@vuxu.org>

LICENSE
     fail is in the public domain.

     To the extent possible under law, the creator of this work has waived all
     copyright and related or neighboring rights to this work.

     http://creativecommons.org/publicdomain/zero/1.0/

Void Linux                     January 11, 2019                     Void Linux