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
-
errno
- Number of last error.
-
MAX_OPEN_FILES
- The maximum number of files a process may have open.
-
openFiles
- The array of file descriptors for open files.
-
ProcessContext()
- Construct a process context.
-
ProcessContext(short, short, String, short)
- Construct a process context and specify uid, gid, dir, and umask.
-
getDir()
- Get the process working directory.
-
getGid()
- Get the process gid.
-
getUid()
- Get the process uid.
-
getUmask()
- Get the process umask.
-
setDir(String)
- Set the process working directory.
-
setGid(short)
- Set the process gid.
-
setUid(short)
- Set the process uid.
-
setUmask(short)
- Set the process umask.
errno
public int errno
- Number of last error.
Simulates the unix system variable:
extern int errno;
MAX_OPEN_FILES
public static int MAX_OPEN_FILES
- The maximum number of files a process may have open.
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.
ProcessContext
public ProcessContext()
- Construct a process context. By default, uid=1, gid=1, dir="/root",
and umask=0000.
ProcessContext
public ProcessContext(short newUid,
short newGid,
String newDir,
short newUmask)
- Construct a process context and specify uid, gid, dir, and umask.
setUid
public void setUid(short newUid)
- Set the process uid.
getUid
public short getUid()
- Get the process uid.
setGid
public void setGid(short newGid)
- Set the process gid.
getGid
public short getGid()
- Get the process gid.
setDir
public void setDir(String newDir)
- Set the process working directory.
getDir
public String getDir()
- Get the process working directory.
setUmask
public void setUmask(short newUmask)
- Set the process umask.
getUmask
public short getUmask()
- Get the process umask.