frysk.sys
Class PseudoTerminal

java.lang.Object
  extended by frysk.sys.FileDescriptor
      extended by frysk.sys.PseudoTerminal

public class PseudoTerminal
extends FileDescriptor

Open a pty


Field Summary
private  File file
           
private  String name
           
 
Fields inherited from class frysk.sys.FileDescriptor
err, in, out, RDONLY, RDWR, WRONLY
 
Constructor Summary
PseudoTerminal()
           
PseudoTerminal(boolean controllingTerminal)
          Open a pseudo-terminal, a.k.a.
 
Method Summary
 ProcessIdentifier addChild(String[] args)
          Convenience method, adds a child process bound to this pseudo-terminal.
 ProcessIdentifier addDaemon(String[] args)
          Convenience method, adds a daemon process bound to this pseudo-terminal.
private static int child(String exe, String[] args, String name)
           
private static int daemon(String exe, String[] args, String name)
           
 File getFile()
          Return the path of the pseudo-terminal's slave.
private static String getName(int fd)
          Returns the pathname of corrsponding to the fd
private static int open(boolean controllingTerminal)
          Returns an open master fd for a pseudo-terminal.
 String toString()
           
 
Methods inherited from class frysk.sys.FileDescriptor
close, dup, finalize, getFd, getInputStream, getOutputStream, getSize, read, read, ready, ready, seekCurrent, seekEnd, seekSet, setSize, write, write
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private final String name

file

private final File file
Constructor Detail

PseudoTerminal

public PseudoTerminal(boolean controllingTerminal)
Open a pseudo-terminal, a.k.a. pty, not wired to anything.


PseudoTerminal

public PseudoTerminal()
Method Detail

getName

private static String getName(int fd)
Returns the pathname of corrsponding to the fd


open

private static int open(boolean controllingTerminal)
Returns an open master fd for a pseudo-terminal.


toString

public String toString()
Overrides:
toString in class FileDescriptor

getFile

public File getFile()
Return the path of the pseudo-terminal's slave.


addChild

public ProcessIdentifier addChild(String[] args)
Convenience method, adds a child process bound to this pseudo-terminal.


child

private static int child(String exe,
                         String[] args,
                         String name)

addDaemon

public ProcessIdentifier addDaemon(String[] args)
Convenience method, adds a daemon process bound to this pseudo-terminal.


daemon

private static int daemon(String exe,
                          String[] args,
                          String name)