[Cmake-commits] CMake branch, master, updated. v2.8.1-1307-gb9e3c24

KWSys Robot kwrobot at kitware.com
Fri Jun 11 11:10:04 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  b9e3c243d476efa04479d253cfc4f76ecbdb6fe3 (commit)
      from  60478de3e5032a0db59f27e913fef222fe767518 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9e3c243d476efa04479d253cfc4f76ecbdb6fe3
commit b9e3c243d476efa04479d253cfc4f76ecbdb6fe3
Author: Brad King <brad.king at kitware.com>
Date:   Fri Jun 11 11:00:38 2010 -0400

    KWSys: Teach Process to error on empty command
    
    Do not try to execute a child with no command line.  Previously this led
    to a silent hang.

diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index adadef1..9c66a44 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -720,6 +720,14 @@ void kwsysProcess_Execute(kwsysProcess* cp)
     return;
     }
 
+  /* Make sure we have something to run.  */
+  if(cp->NumberOfCommands < 1)
+    {
+    strcpy(cp->ErrorMessage, "No command");
+    cp->State = kwsysProcess_State_Error;
+    return;
+    }
+
   /* Initialize the control structure for a new process.  */
   if(!kwsysProcessInitialize(cp))
     {
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index c5ea6db..5aa4d8b 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -987,6 +987,14 @@ void kwsysProcess_Execute(kwsysProcess* cp)
     return;
     }
 
+  /* Make sure we have something to run.  */
+  if(cp->NumberOfCommands < 1)
+    {
+    strcpy(cp->ErrorMessage, "No command");
+    cp->State = kwsysProcess_State_Error;
+    return;
+    }
+
   /* Initialize the control structure for a new process.  */
   if(!kwsysProcessInitialize(cp))
     {

-----------------------------------------------------------------------

Summary of changes:
 Source/kwsys/ProcessUNIX.c  |    8 ++++++++
 Source/kwsys/ProcessWin32.c |    8 ++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list