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
  29 The
  30 .Fn Pdelwapt
  31 function removes the watchpoint specified by
  32 .Fa wp
  33 from the process represented by the handle
  34 .Fa P .
  35 The watchpoint should have been installed with either
  36 .Xr Psetwapt 3PROC
  37 or the underlying /proc file system
  38 .Sy PCWATCH
  39 operation.
  40 .Pp
  41 The
  42 .Fn Pdelwapt
  43 function only works on running processes, such as those created through
  44 .Xr Pgrab 3PROC
  45 and
  46 .Xr Pcreate 3PROC .
  47 Attempting to remove a watchpoint from process handles to core files,
  48 zombie processes, or ELF objects will fail.
  49 .Sh RETURN VALUES
  50 Upon successful completion, the
  51 .Fn Pdelwapt
  52 function removes the watchpoint and returns
  53 .Sy 0 .
  54 Otherwise,
  55 .Sy -1
  56 is returned,
  57 .Sy errno
  58 is set to indicate the error.
  59 .Sh ERRORS
  60 For a full list of possible errors see the
  61 .Sy DIAGNOSTICS
  62 section in
  63 .Xr proc 4 .
  64 .Pp
  65 The
  66 .Fn Pdelwapt
  67 function will fail with:
  68 .Bl -tag -width Er
  69 .It Er ENOENT
  70 The handle
  71 .Fa P
  72 refers 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
  77 See
  78 .Sy LOCKING
  79 in
  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