summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-10 14:16:26 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-03-10 14:16:26 (GMT)
commit2b64dc7cabb6eda86f0c8b91b27aee4119ac7ebb (patch)
treea94018ac84a283702c088896ffaa10c84f10386a
parent1ed74b9d228a076b2b0ad4476ea9013cf143354e (diff)
parentfd466fe657da176e3fa46803a11dfcb662d7395d (diff)
downloadCMake-2b64dc7cabb6eda86f0c8b91b27aee4119ac7ebb.zip
CMake-2b64dc7cabb6eda86f0c8b91b27aee4119ac7ebb.tar.gz
CMake-2b64dc7cabb6eda86f0c8b91b27aee4119ac7ebb.tar.bz2
Merge topic 'update-kwsys'
fd466fe6 Merge branch 'upstream-KWSys' into update-kwsys cd4fef30 KWSys 2016-03-09 (36d8666f)
-rw-r--r--Source/kwsys/Process.h.in7
-rw-r--r--Source/kwsys/ProcessUNIX.c11
-rw-r--r--Source/kwsys/ProcessWin32.c11
3 files changed, 29 insertions, 0 deletions
diff --git a/Source/kwsys/Process.h.in b/Source/kwsys/Process.h.in
index c5ebc97..96563a2 100644
--- a/Source/kwsys/Process.h.in
+++ b/Source/kwsys/Process.h.in
@@ -77,6 +77,7 @@
# define kwsysProcess_WaitForExit kwsys_ns(Process_WaitForExit)
# define kwsysProcess_Interrupt kwsys_ns(Process_Interrupt)
# define kwsysProcess_Kill kwsys_ns(Process_Kill)
+# define kwsysProcess_ResetStartTime kwsys_ns(Process_ResetStartTime)
#endif
#if defined(__cplusplus)
@@ -392,6 +393,11 @@ kwsysEXPORT void kwsysProcess_Interrupt(kwsysProcess* cp);
*/
kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
+/**
+ * Reset the start time of the child process to the current time.
+ */
+kwsysEXPORT void kwsysProcess_ResetStartTime(kwsysProcess* cp);
+
#if defined(__cplusplus)
} /* extern "C" */
#endif
@@ -456,6 +462,7 @@ kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
# undef kwsysProcess_WaitForExit
# undef kwsysProcess_Interrupt
# undef kwsysProcess_Kill
+# undef kwsysProcess_ResetStartTime
# endif
#endif
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 7402955..b577982 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -3058,3 +3058,14 @@ static void kwsysProcessesSignalHandler(int signum
errno = old_errno;
}
+
+/*--------------------------------------------------------------------------*/
+void kwsysProcess_ResetStartTime(kwsysProcess* cp)
+{
+ if(!cp)
+ {
+ return;
+ }
+ /* Reset start time. */
+ cp->StartTime = kwsysProcessTimeGetCurrent();
+}
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index a18ea27..2b93e69 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -3017,3 +3017,14 @@ static BOOL WINAPI kwsysCtrlHandler(DWORD dwCtrlType)
/* Continue on to default Ctrl handler (which calls ExitProcess). */
return FALSE;
}
+
+/*--------------------------------------------------------------------------*/
+void kwsysProcess_ResetStartTime(kwsysProcess* cp)
+{
+ if(!cp)
+ {
+ return;
+ }
+ /* Reset start time. */
+ cp->StartTime = kwsysProcessTimeGetCurrent();
+}