about summary refs log tree commit diff
path: root/README
blob: 15b891f646739803b5c6496eb53c1ff6ba3be1c7 (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
REAP(1)                     General Commands Manual                    REAP(1)

NAME
     reap – run process until all its spawned processes are dead

SYNOPSIS
     reap [-vwx] command line ...

DESCRIPTION
     The reap utility executes the given command line and ensures all spawned
     processes are dead before it exits.

     By default, it will start slaying the spawned processes when the main
     process exits.  When the option -w is given, reap will instead wait for
     the processes to terminate.

     Upon receiving SIGINT or SIGTERM, reap will start slaying all children
     immediately.

     The options are as follows:

     -v      Verbose mode, report what reap is doing.

     -w      Wait for all spawned processes to finish.

     -x      Forbid execution of binaries we cannot kill (using
             PR_SET_NO_NEW_PRIVS).

EXIT STATUS
     The reap utility exits with the exit status of the spawned command.

     On fatal errors, exit codes 111 is returned.

ASSUMPTIONS
     reap uses the PR_SET_CHILD_SUBREAPER feature of Linux.  Slaying the
     children only works when the kernel configuration CONFIG_PROC_CHILDREN is
     enabled.

     reap can only work reliably when it has permission to kill all spawned
     processes and they respect SIGTERM (see also -x).

RATIONALE
     Keeping track of all spawned process is traditionally a hard problem on
     Unix systems, mainly due to daemonization by forking twice.

     Other approaches on Linux exist, such as cgroups or PID namespaces.  The
     approach taken by reap has the benefit of requiring no special
     permissions.

AUTHORS
     Leah Neukirchen <leah@vuxu.org>

LICENSE
     reap 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                    September 23, 2019                    Void Linux