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