You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_Shell object:
Cvo_Shell
Cvo_Text
#include
<Cvo/Shell.h++>
new
Cvo_Shell ( char *resource_name,
{ Cvo_Object *parent | Display *display },
char *program,
char *argv )
The Cvo_Shell object attaches a pseudo tty to a Cvo_Text object and runs the command specified by program with the arguments specified in argv. The Cvo_Shell window will report size changes to the program running (though this does not guarantee that the program will respond correctly.
This object defines the following member functions in addition to those defined by its parent and ancestor objects.
int Wait (
)
Wait for the child process in the shell to exit and return the exit status. A -1 value is returned if the child was never executed.
This object defines the following Cvo Events in addition to those defined by its parent and ancestor objects.
CvoShellDoneEvent
struct
Cvo_ShellDoneEvent
pid_t pid
This event is generated when the input pty to the shell is closed
(i.e. the user types <CTRL-D> or the input file comes to an
EOF
). The pid field will contain the process id of the child
forked from the Cvo_Shell object.
CvoShellExitEvent
struct
Cvo_ShellExitEvent
int status
This event is generated when the shell actually exits (after closing the ptys). The status element contains the exit status of the program. It will be zero if the program exited normally, -1 otherwise.
This object defines the following event translations in addition to those defined by its parent and ancestor objects.
~Ctrl<Btn2Up>
:
insert-selection(PRIMARY, CUT_BUFFER0)
This translation will insert the current selection buffer at the mouse position.
This object modifies the following X resources which are used by its parent or other ancestors.
*CvoShell.Cursor
(new value:
xterm
)
*CvoShell*FontFamily
(new value:
Courier
)
*CvoShell*Pad
(new value:
2
)
*CvoShell*Sunken
(new value:
True
)
*CvoShell*TabStop
(new value:
8
)
See the example source code for an example of how to use this object.
See the legend for information about the conventions used in this documentation.