]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/3/proc
vt: implement proper selections (thanks Ori_B)
[plan9front.git] / sys / man / 3 / proc
index c5863dc73c74d93e10f76717fe190b3b49f54cdd..283071f713239147592d4dd722434a8530727b8d 100644 (file)
@@ -132,15 +132,17 @@ the six 11-character numbers also held in the process's
 .B #c/cputime
 file
 .IP \-
-the amount of memory used by the process, except its stack,
-in units of 1024 bytes
+the amount of memory used by the process in units of 1024 bytes
 .IP \-
 the base and current scheduling priority, each 11 character numbers
 .PP
-The read-only
+The
 .B args
 file contains the arguments of the program when it was created by
 .IR exec (2).
+Writing to the
+.B args
+file will overwrite its contents.
 If the program was not created by
 .BR exec ,
 such as by
@@ -249,6 +251,22 @@ and a
 and
 .BR /sys/src/cmd/trace.c ).
 .
+.PP
+The \fLwatchpt\fR file contains a list of the watchpoints set for the process.
+If supported by the hardware, watchpoints can be used to trap accesses to specific addresses.
+Each line in the file has the form "\fItype\fR \fIaddress\fR \fIlength\fR",
+where \fItype\fR consists of the characters \fLr\fR (read), \fLw\fR (write), \fLx\fR (execute) or \fL-\fR (padding character).
+The watchpoint triggers on an access to the \fIlength\fR bytes starting at \fIaddress\fR if the type of the access must match one of the characters in the \fItype\fR field.
+.PP
+Writing to the file either replaces (offset zero) or adds to (offset non-zero) the list of watchpoints.
+Each line written must be terminated by a newline.
+If and only if all lines written comply with the (usually rather idiosyncratic) hardware restrictions, the list is updated; otherwise all changes are discarded.
+Watchpoints can also be cleared by opening the file with \fLOTRUNC\fR (see
+.IR open (2)).
+.PP
+A triggered watchpoint will deliver a \fLsys: watchpoint\fR note which includes a comma-separated list of the watchpoints that were triggered, where 0 corresponds to the first line in the
+.B watchpt
+file, 1 to the second and so forth.
 .SS Control messages
 Textual messages written to the
 .B ctl
@@ -299,32 +317,39 @@ This bit is inherited across
 and
 .IR exec (2).
 .TP 10n
-.B "close\ \fIn
-Close file descriptor
-.I n
-in the process.
-.TP 10n
-.B closefiles
-Close all open file descriptors in the process.
-.TP 10n
 .B nohang
 Clear the hang bit.
 .TP 10n
+.B private
+Make it impossible to read the process's user memory.
+This property is inherited on
+.IR fork (2),
+cleared on
+.IR exec (2),
+and is not otherwise resettable.
+.TP 10n
 .B noswap
 Don't allow this process to be swapped out.  This should
 be used carefully and sparingly or the system could run
 out of memory.  It is meant for processes that can't be
-swapped, like the ones implementing the swap device and for
-processes containing sensitive data.
+swapped, like the local fileserver implementing the swap
+device and for processes containing sensitive data.
+This property is inherited on
+.IR fork (2),
+cleared on
+.IR exec (2),
+and is not otherwise resettable.
 .TP 10n
 .B kill
 Kill the process the next time it crosses the user/kernel boundary.
 .TP 10n
-.B private
-Make it impossible to read the process's user memory.
-This property is inherited on fork, cleared on
-.IR exec (2),
-and is not otherwise resettable.
+.B "close\ \fIn
+Close file descriptor
+.I n
+in the process.
+.TP 10n
+.B closefiles
+Close all open file descriptors in the process.
 .TP 10n
 .B "pri\ \fIn
 Set the base priority for the process to the integer
@@ -341,6 +366,15 @@ Without an argument, toggle trace event generation for this process into
 With a zero argument, tracing for the proc is turned off, with a non-zero numeric
 argument, it is turned on.
 .TP 10n
+.B interrupt
+Interrupt a blocking system call. If no blocking call was in progress,
+the interrupt will be pending and the next attempt to block will be interrupted.
+This is similar to posting a note but, unlike notes, a pending interrupt is not
+cleared when crossing the user/kernel boundary.
+.TP 10n
+.B nointerrupt
+Clear a pending interrupt.
+.TP 10n
 .B "period\ \fInu
 Set the real-time scheduling period of the process to
 .IR nu ,