Class ProcessContext

java.lang.Object
   |
   +----ProcessContext

public class ProcessContext
extends Object
A process context. This contains all information needed by the file system which is specific to a process.

Author:
Ray Ontko

Variable Index

 o errno
Number of last error.
 o MAX_OPEN_FILES
The maximum number of files a process may have open.
 o openFiles
The array of file descriptors for open files.

Constructor Index

 o ProcessContext()
Construct a process context.
 o ProcessContext(short, short, String, short)
Construct a process context and specify uid, gid, dir, and umask.

Method Index

 o getDir()
Get the process working directory.
 o getGid()
Get the process gid.
 o getUid()
Get the process uid.
 o getUmask()
Get the process umask.
 o setDir(String)
Set the process working directory.
 o setGid(short)
Set the process gid.
 o setUid(short)
Set the process uid.
 o setUmask(short)
Set the process umask.

Variables

 o errno
 public int errno
Number of last error.

Simulates the unix system variable:

   extern int errno;
 

 o MAX_OPEN_FILES
 public static int MAX_OPEN_FILES
The maximum number of files a process may have open.

 o openFiles
 public FileDescriptor openFiles[]
The array of file descriptors for open files. The integer file descriptors for kernel method calls are indexes into this array.

Constructors

 o ProcessContext
 public ProcessContext()
Construct a process context. By default, uid=1, gid=1, dir="/root", and umask=0000.

 o ProcessContext
 public ProcessContext(short newUid,
                       short newGid,
                       String newDir,
                       short newUmask)
Construct a process context and specify uid, gid, dir, and umask.

Methods

 o setUid
 public void setUid(short newUid)
Set the process uid.

 o getUid
 public short getUid()
Get the process uid.

 o setGid
 public void setGid(short newGid)
Set the process gid.

 o getGid
 public short getGid()
Get the process gid.

 o setDir
 public void setDir(String newDir)
Set the process working directory.

 o getDir
 public String getDir()
Get the process working directory.

 o setUmask
 public void setUmask(short newUmask)
Set the process umask.

 o getUmask
 public short getUmask()
Get the process umask.