prog - interface to running programs — Inferno 1ed
prog - interface to running programs
bind '#p' /prog /prog/<n>/ctl /prog/<n>/dbgctl /prog/<n>/heap /prog/<n>/ns /prog/<n>/nsgrp /prog/<n>/pgrp /prog/<n>/stack /prog/<n>/status /prog/<n>/text /prog/<n>/wait ...
Description
The prog device serves a two-level structure. The first level contains numbered directories corresponding to pids of live Inferno processes. The second level, for each such directory, contains a set of files representing the corresponding process. All files operate on utf strings.
status (read-only)
The status file contains six fields, each separated by a blank. The fields are:
pgrp (read-only)
The pgrp file contains the process group identifier in decimal format.
nsgrp (read-only)
The nsgrp file contains the name space group identifier in decimal format.
ns (read-only)
The ns file contains an ordered set of triples, separated by a space, which describe the bind and mount operations used to construct the name space. The fields are: the integer flags, the to file, and the from file.
wait (read-only)
The wait file may be read to recover information about the exiting children of the process. A read of wait will block until a child of the process, created after wait was opened, exits. When such a child exits, the read returns a string with three fields:|
pid of exiting process
|
decimal value, followed by a space
|
|
module name
|
string, enclosed in double-quotes
|
|
error message
|
zero to 64 characters
|
ctl
Messages written to the ctl file control the execution of the process.
|
kill
|
Kill the process.
|
|
killgrp
|
Kill all processes in the same group as the process. A process writing to its own ctl file does not kill itself.
|
dbgctl
The dbgctl file provides facilities for debugging a process. Messages written to the file control the execution of the process.
stack (read-only)
The stack file contains the dynamic call stack trace. Each activation frame is described by one line with six fields, each separated by a space:
The top activation frame starts at offset 0.
heap
The heap file may be queried to examine the state of the process. The file must be opened for both read and write (ORDWR). Moreover, access to this debugging facility may be not be allowed in production systems.
|
W
|
32-bit decimal integers.
|
|
B
|
8-bit unsigned decimal bytes.
|
|
V
|
64-bit decimal integers.
|
|
R
|
64-bit reals.
|
|
I
|
Disassembled Dis instructions.
|
|
P
|
32-bit hexadecimal address, or nil.
|
The following formats examine properties of specific 32-bit pointers.
text
The text file is currently unimplemented. process states
See Also
ps - thread status in Chapter 5
infernosupport@lucent.com Copyright © 1996,Lucent Technologies, Inc. All rights reserved.