xref: /illumos-gate/usr/src/man/man3proc/Pdelwapt.3proc (revision c160bf3613805cfb4a89a0433ae896d3594f551f)
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 SYNOPSIS
21.Lb libproc
22.In libproc.h
23.Ft int
24.Fo Pdelwapt
25.Fa "struct ps_prochandle *P"
26.Fa "const prwatch_t *wp"
27.Fc
28.Sh DESCRIPTION
29The
30.Fn Pdelwapt
31function removes the watchpoint specified by
32.Fa wp
33from the process represented by the handle
34.Fa P .
35The watchpoint should have been installed with either
36.Xr Psetwapt 3PROC
37or the underlying /proc file system
38.Sy PCWATCH
39operation.
40.Pp
41The
42.Fn Pdelwapt
43function only works on running processes, such as those created through
44.Xr Pgrab 3PROC
45and
46.Xr Pcreate 3PROC .
47Attempting to remove a watchpoint from process handles to core files,
48zombie processes, or ELF objects will fail.
49.Sh RETURN VALUES
50Upon successful completion, the
51.Fn Pdelwapt
52function removes the watchpoint and returns
53.Sy 0 .
54Otherwise,
55.Sy -1
56is returned,
57.Sy errno
58is set to indicate the error.
59.Sh ERRORS
60For a full list of possible errors see the
61.Sy DIAGNOSTICS
62section in
63.Xr proc 4 .
64.Pp
65The
66.Fn Pdelwapt
67function will fail with:
68.Bl -tag -width Er
69.It Er ENOENT
70The handle
71.Fa P
72refers to a grabbed core file, a zombie process, or an ELF object.
73.El
74.Sh INTERFACE STABILITY
75.Sy Uncommitted
76.Sh MT-LEVEL
77See
78.Sy LOCKING
79in
80.Xr libproc 3LIB .
81.Sh SEE ALSO
82.Xr libproc 3LIB ,
83.Xr Pcreate 3PROC ,
84.Xr Pgrab 3PROC ,
85.Xr Pgrab_core 3PROC ,
86.Xr Pgrab_file 3PROC ,
87.Xr Psetwapt 3PROC ,
88.Xr proc 4
89