VkProgram(3x)
VkProgram - Object-oriented interface to subprogram execution
As shipped in IRIX 6.5.22. Last changed in IRIX 6.5.5.
NAME VkProgram - Object-oriented interface to subprogram execution INHERITS FROM VkCallbackObject : HEADER FILE #include <Vk/VkProgram.h> PUBLIC PROTOCOL SUMMARY Constructor/Destructor VkProgram(const char* cmd, int killChildOnExit = 1); virtual void ~VkProgram(void); Control Functions virtual VkSubProcess run(void); Setup Functions void redirectIn(int do_redirect); PROTECTED PROTOCOL SUMMARY Protected Data Members char* _cmd; const int _killChildOnExit; int _redirectIn; CLASS DESCRIPTION The VkProgram class is an object-oriented interface to fork/exec. It spawns a program and passes the output back to the application. FUNCTION DESCRIPTIONS VkProgram() VkProgram(const char* cmd, int killChildOnExit = 1); virtual void ~VkProgram(void); Sets up the VkProgram object. The first argument specifies a command to execute when the run() method is called. The second argument indicates that the running child, if any, should be killed whenever this process exits. run() virtual VkSubProcess run(void); Forks and execs a child process, running the command specified in the constructor. Returns the VkSubProcess object created as a result. redirectIn() void redirectIn(int do_redirect); If the argument is non-zero, indicates that an input pipe should be setup when the child process is created, giving the application the ability to send input to the process. DATA MEMBER DESCRIPTIONS _cmd char* _cmd; The command to be executed. _killChildOnExit const int _killChildOnExit; Whether to set the child process options so that it terminates whenever the parent process terminates. _redirectIn int _redirectIn; Whether to setup an input pipe. exitCallback static const const char* exitCallback; This callback is called when the child process exits. The callData is an integer (cast to type void *) that reports the exit status. This callback is passed on to an instance of VkSubProcess, so the VkCallbackObject passed as the first argument is actually an instance of VkSubProcess. stdoutCallback static const const char* stdoutCallback; This callback is called when the child process has output directed to stdout. The VkCallbackObject pointer passed as the first argument is a VkInput object, because this callback is passed down a chain of objects that ultimately ends with a VkInput object that handled input from stdout. stderrCallback static const const char* stderrCallback; This callback is called when the child process has output directed to stderr. The VkCallbackObject pointer passed as the first argument is a VkInput object, because this callback is passed down a chain of objects that ultimately ends with a VkInput object that handled input from stderr. INHERITED MEMBER FUNCTIONS Inherited from VkCallbackObject callCallbacks() className(), addCallback(), removeCallback(), removeAllCallbacks(), hasCallbacks(), cloneCallbacks(), cloneCallback() KNOWN DERIVED CLASSES VIEWKIT 2.1 CHANGES Control Funtions virtual VkSubProcess run(VkScreen *screen); this additional API provides support for multi-screen applications... CLASSES USED BY THIS CLASS VkSubProcess BUGS SEE ALSO VkCallbackObject, VkSubProcess ViewKit Programmer's Guide The X Window System, DEC Press, Bob Sheifler and Jim Gettys The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick The OSF/Motif Programmers Reference, Prentice Hall, OSF