VkSubProcessRep(3x) VkSubProcessRep(3x)
VkSubProcess, VkSubProcessRep - Object-oriented interface to a running
subprocess
VkSPCounted : VkCallbackObject :
#include <Vk/VkSubProcess.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
static VkSubProcess create(char* cmd,
int killChildOnExit,
int redirectIn);
Access Functions [Toc] [Back]
pid_t pid(void);
int exitStatus(void);
int stdinfd(void);
VkPipe* getStdoutPipe(void);
VkPipe* getStderrPipe(void);
Control Functions [Toc] [Back]
void signal(int sig);
void kill(int sig = SIGTERM);
void run(void);
The VkSubProcessRep class is the actual reference-counted class created
by VkSubProcess. It represents a running subprocess, and gives the
application control and access to its output.
FUNCTION DESCRIPTIONS [Toc] [Back] create()
static VkSubProcess create(char* cmd,
int killChildOnExit,
int redirectIn);
Creates a VkSubProcess. The first argument is the command to be
executed, the second argument controls whether the child should be
killed whenever the parent goes away, and the last argument
indicates whether to create an input pipe. Use the run() method to
actually start the subprocess.
Page 1
VkSubProcessRep(3x) VkSubProcessRep(3x)
pid()
pid_t pid(void);
Returns the process ID of a running subprocess. If the subprocess
has not been created or isn't running yet, returns 0.
exitStatus()
int exitStatus(void);
Returns the last exit status of the subprocess. Call this method
after the exitCallback has been called, indicating that the
subprocess has exited.
signal()
void signal(int sig);
Send a signal to a running subprocess.
kill()
void kill(int sig = SIGTERM);
Kill a running subprocess. The default signal sent is SIGTERM.
stdinfd()
int stdinfd(void);
Returns the input file descriptor. This will only be valid if
redirectIn was set to TRUE in the constructor.
getStdoutPipe()
VkPipe* getStdoutPipe(void);
Returns the stdout pipe.
getStderrPipe()
VkPipe* getStderrPipe(void);
Returns the stderr pipe.
run()
void run(void);
Page 2
VkSubProcessRep(3x) VkSubProcessRep(3x)
Starts the subprocess created in the constructor.
VkSubProcessRep() [Toc] [Back]
VkSubProcessRep(const char* prog, char** argv,
int killChildOnExit, int redirectIn);
Creates a subprocess. The first argument is the program name, the
second is the list of arguments, the third specifies if the
subprocess should be killed whenever the application goes away, and
the last indicates that a stdin pipe should be created.
~VkSubProcessRep()
virtual void ~VkSubProcessRep(void);
Destroys the VkSubProcess object and closes any pipes to a running
subprocess object.
INHERITED MEMBER FUNCTIONS [Toc] [Back] Inherited from VkSPCounted
VkSPCounted(), ~VkSPCounted(),
Inherited from VkCallbackObject [Toc] [Back]
callCallbacks(), VkCallbackObject(), ~VkCallbackObject(),
className(), addCallback(), addCallback(), removeCallback(),
removeCallback(), removeAllCallbacks(), removeAllCallbacks(),
hasCallbacks(), cloneCallbacks(), cloneCallback(),
cloneCallback(),
VIEWKIT 2.1 CHANGES
Control Funtions
void run(VkScreen *screen);
this additional API provides support for multi-screen
applications...
CLASSES USED BY THIS CLASS
VkApp, VkCallbackObject, VkDialogManager, VkPipe
KNOWN CLASSES THAT USE THIS CLASS [Toc] [Back] VkProgram
VkCallbackObject, VkPipe, VkProgram
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
Page 3
VkSubProcessRep(3x) VkSubProcessRep(3x)
PPPPaaaaggggeeee 4444 [ Back ]
|