summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/Process.h.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-12-03 14:20:05 (GMT)
committerBrad King <brad.king@kitware.com>2003-12-03 14:20:05 (GMT)
commitad8bc4b1a43dd017d361f189ec2b38d97e7de987 (patch)
tree5133b13c81008845db91c734e9872b66767d7c29 /Source/kwsys/Process.h.in
parentbe15d66e37d000993833a1e5a614ec969c86f7c8 (diff)
downloadCMake-ad8bc4b1a43dd017d361f189ec2b38d97e7de987.zip
CMake-ad8bc4b1a43dd017d361f189ec2b38d97e7de987.tar.gz
CMake-ad8bc4b1a43dd017d361f189ec2b38d97e7de987.tar.bz2
ENH: Merged changes from KWSys-MultiProcess-bp to KWSys-MultiProcess-b2t-1-mp to main tree. This introduces support for process pipelines.
Diffstat (limited to 'Source/kwsys/Process.h.in')
-rw-r--r--Source/kwsys/Process.h.in19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/kwsys/Process.h.in b/Source/kwsys/Process.h.in
index c97212f..36d24f0 100644
--- a/Source/kwsys/Process.h.in
+++ b/Source/kwsys/Process.h.in
@@ -30,6 +30,7 @@
#define kwsysProcess_New kwsys(Process_New)
#define kwsysProcess_Delete kwsys(Process_Delete)
#define kwsysProcess_SetCommand kwsys(Process_SetCommand)
+#define kwsysProcess_AddCommand kwsys(Process_AddCommand)
#define kwsysProcess_SetTimeout kwsys(Process_SetTimeout)
#define kwsysProcess_SetWorkingDirectory kwsys(Process_SetWorkingDirectory)
#define kwsysProcess_Option_HideWindow kwsys(Process_Option_HideWindow)
@@ -89,10 +90,21 @@ kwsysEXPORT void kwsysProcess_Delete(kwsysProcess* cp);
/**
* Set the command line to be executed. Argument is an array of
* pointers to the command and each argument. Ths array must end with
- * a NULL pointer.
+ * a NULL pointer. Any previous command lines are removed. Returns
+ * 1 for success and 0 otherwise.
*/
-kwsysEXPORT void kwsysProcess_SetCommand(kwsysProcess* cp,
- char const* const* command);
+kwsysEXPORT int kwsysProcess_SetCommand(kwsysProcess* cp,
+ char const* const* command);
+
+/**
+ * Add a command line to be executed. Argument is an array of
+ * pointers to the command and each argument. Ths array must end with
+ * a NULL pointer. If this is not the first command added, its
+ * standard input will be connected to the standard output of the
+ * previous command. Returns 1 for success and 0 otherwise.
+ */
+kwsysEXPORT int kwsysProcess_AddCommand(kwsysProcess* cp,
+ char const* const* command);
/**
* Set the timeout for the child process. The timeout period begins
@@ -280,6 +292,7 @@ kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
# undef kwsysProcess_New
# undef kwsysProcess_Delete
# undef kwsysProcess_SetCommand
+# undef kwsysProcess_AddCommand
# undef kwsysProcess_SetTimeout
# undef kwsysProcess_SetWorkingDirectory
# undef kwsysProcess_Option_HideWindow