1preap(1)                         User Commands                        preap(1)
2
3
4

NAME

6       preap - force a defunct process to be reaped by its parent
7

SYNOPSIS

9       preap [-F] pid...
10
11

DESCRIPTION

13       A  defunct  (or  zombie) process is one whose exit status has yet to be
14       reaped by its parent. The exit status is reaped by way of the wait(3C),
15       waitid(2),  or  waitpid(3C) system call. In the normal course of system
16       operation, zombies can occur, but are typically short-lived.  This  can
17       happen  if a parent exits without having reaped the exit status of some
18       or all of its children. In that case, those children are reparented  to
19       PID 1. See init(1M), which periodically reaps such processes.
20
21
22       An  irresponsible  parent process can not exit for a very long time and
23       thus leave zombies on the system. Since the operating  system  destroys
24       nearly  all  components  of  a  process before it becomes defunct, such
25       defunct processes do not normally  impact  system  operation.  However,
26       they do consume a small amount of system memory.
27
28
29       preap  forces  the parent of the process specified by pid to waitid(3C)
30       for pid, if pid represents a defunct process.
31
32
33       preap attempts to prevent the administrator  from  unwisely  reaping  a
34       child process which might soon be reaped by the parent, if:
35
36           o      The process is a child of init(1M).
37
38           o      The  parent  process  is stopped and might wait on the child
39                  when it is again allowed to run.
40
41           o      The process has been defunct for less than one minute.
42

OPTIONS

44       The following option is supported:
45
46       -F    Forces the parent to reap the child, overriding safety checks.
47
48

OPERANDS

50       The following operand is supported:
51
52       pid    Process ID list.
53
54

USAGE

56       Caution should be exercised when using the -F flag. Imposing  two  con‐
57       trolling  processes  on one victim process can lead to chaos. Safety is
58       assured only if the primary controlling process, typically a  debugger,
59       has  stopped  the victim process and the primary controlling process is
60       doing nothing at the moment of application of the proc  tool  in  ques‐
61       tion.
62

EXIT STATUS

64       The  following exit values are returned by preap, which prints the exit
65       status of each target process reaped:
66
67       0           Successfully operation.
68
69
70       non-zero    Failure, such as no such  process,  permission  denied,  or
71                   invalid option.
72
73

ATTRIBUTES

75       See attributes(5) for descriptions of the following attributes:
76
77
78
79
80       ┌─────────────────────────────┬─────────────────────────────┐
81       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
82       ├─────────────────────────────┼─────────────────────────────┤
83       │Availability                 │SUNWesu (32-bit)             │
84       │                             │SUNWesxu (64-bit)            │
85       └─────────────────────────────┴─────────────────────────────┘
86

SEE ALSO

88       proc(1),   init(1M),   waitid(2),   wait(3C),   waitpid(3C),   proc(4),
89       attributes(5)
90

WARNINGS

92       preap should be applied sparingly and only in situations in  which  the
93       administrator or developer has confirmed that defunct processes are not
94       reaped by the parent process. Otherwise, applying preap can damage  the
95       parent process in unpredictable ways.
96
97
98
99SunOS 5.11                        19 Jun 2006                         preap(1)
Impressum