Next: , Previous: , Up: Special Modes   [Contents][Index]


6.3 Process Mode

Process mode allows the user to execute a Unix process within a Hemlock buffer. These commands and default bindings cater to running Unix shells in buffers. For example, Stop Buffer Subprocess is bound to H-z to stop the process you are running in the shell instead of binding Stop Main Process to this key which would stop the shell itself.

Command: Shell (bound to C-M-s)
Hemlock Variable: Shell Utility (initial value "/bin/csh")
Hemlock Variable: Shell Utility Switches (initial value nil)
Hemlock Variable: Current Shell
Hemlock Variable: Ask about Old Shells

This command executes the process determined by the values of (Shell Utility) and (Shell Utility Switches) in a new buffer named "Shell n" where "n" is some distinguishing integer.

Current Shell is a Hemlock variable that holds to the current shell buffer. When Shell is invoked, if there is a Current Shell, the command goes to that buffer.

When there is no Current Shell, but shell buffers do exist, if Ask about Old Shells is set, the Shell command prompts for one of them, setting Current Shell to the indicated shell, and goes to the buffer.

Invoking Shell with an argument forces the creation of a new shell buffer.

Shell Utility is the string name of the process to execute.

Shell Utility Switches is a string containing the default command line arguments to Shell Utility. This is a string since the utility is typically "/bin/csh", and this string can contain I/O redirection and other shell directives.

Command: Shell Command Line in Buffer

This command prompts for a buffer and a shell command line. It then runs a shell, giving it the command line, in the buffer.

Command: Set Current Shell

This command sets the value of Current Shell.

Command: Stop Main Process

This command stops the process running in the current buffer by sending a :SIGTSTP to that process. With an argument, stops the process using :SIGSTOP.

Command: Continue Main Process

If the process in the current buffer is stopped, this command continues it.

Command: Kill Main Process
Hemlock Variable: Kill Process Confirm (initial value t)

This command prompts for confirmation and kills the process running in the current buffer.

Setting this variable to nil inhibits Hemlock’s prompting for confirmation.

Command: Stop Buffer Subprocess stuff (bound to H-z in Process mode)

This command stops the foreground subprocess of the process in the current buffer, similar to the effect of C-Z in a shell.

Command: Kill Buffer Subprocess

This command kills the foreground subprocess of the process in the current buffer.

Command: Interrupt Buffer Subprocess stuff (bound to H-c in Process mode)

This command interrupts the foreground subprocess of the process in the current buffer, similar to the effect of C-C in a shell.

Command: Quit Buffer Subprocess (bound to H-\ in Process mode)

This command dumps the core of the foreground subprocess of the processs in the current buffer, similar to the effect of C-\ in a shell.

Command: Send EOF to Process stuff (bound to H-d in Process mode)

This command sends the end of file character to the process in the current buffer, similar to the effect of C-D in a shell.

Command: Confirm Process Input stuff (bound to Return in Process mode)

This command sends the text the user has inserted at the end of a process buffer to the process in that buffer. Resulting output is inserted at the end of the process buffer.

The user may edit process input using commands that are shared with Typescript mode, see section typescripts.


Next: Bufed Mode, Previous: View Mode, Up: Special Modes   [Contents][Index]