xref: /illumos-gate/usr/src/man/man3proc/Pdelwapt.3proc (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 11, 2016
15.Dt PDELWAPT 3PROC
16.Os
17.Sh NAME
18.Nm Pdelwapt
19.Nd remove a watchpoint in a process
20.Sh LIBRARY
21.Lb libproc
22.Sh SYNOPSIS
23.In libproc.h
24.Ft int
25.Fo Pdelwapt
26.Fa "struct ps_prochandle *P"
27.Fa "const prwatch_t *wp"
28.Fc
29.Sh DESCRIPTION
30The
31.Fn Pdelwapt
32function removes the watchpoint specified by
33.Fa wp
34from the process represented by the handle
35.Fa P .
36The watchpoint should have been installed with either
37.Xr Psetwapt 3PROC
38or the underlying /proc file system
39.Sy PCWATCH
40operation.
41.Pp
42The
43.Fn Pdelwapt
44function only works on running processes, such as those created through
45.Xr Pgrab 3PROC
46and
47.Xr Pcreate 3PROC .
48Attempting to remove a watchpoint from process handles to core files,
49zombie processes, or ELF objects will fail.
50.Sh RETURN VALUES
51Upon successful completion, the
52.Fn Pdelwapt
53function removes the watchpoint and returns
54.Sy 0 .
55Otherwise,
56.Sy -1
57is returned,
58.Sy errno
59is set to indicate the error.
60.Sh ERRORS
61For a full list of possible errors see the
62.Sy DIAGNOSTICS
63section in
64.Xr proc 5 .
65.Pp
66The
67.Fn Pdelwapt
68function will fail with:
69.Bl -tag -width Er
70.It Er ENOENT
71The handle
72.Fa P
73refers to a grabbed core file, a zombie process, or an ELF object.
74.El
75.Sh INTERFACE STABILITY
76.Sy Uncommitted
77.Sh MT-LEVEL
78See
79.Sy LOCKING
80in
81.Xr libproc 3LIB .
82.Sh SEE ALSO
83.Xr libproc 3LIB ,
84.Xr Pcreate 3PROC ,
85.Xr Pgrab 3PROC ,
86.Xr Pgrab_core 3PROC ,
87.Xr Pgrab_file 3PROC ,
88.Xr Psetwapt 3PROC ,
89.Xr proc 5
90