]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check return value of system() call.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 20 Sep 2013 00:43:29 +0000 (00:43 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 20 Sep 2013 00:43:29 +0000 (00:43 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30868 0785d39b-7218-0410-832d-ea1e28bc413d

tests/tests.h

index 15b1f49adff414d7ed81fe342d1bf585c38119f0..5c1a8dd2c8215ce7014fa10661ab171984ce0cdb 100644 (file)
@@ -206,7 +206,9 @@ struct MPILogInitAll
  */
 void sort_file_contents (const std::string &filename)
 {
-  std::system ((std::string ("sort ") + filename + " -o " + filename).c_str());
+  int error = std::system ((std::string ("sort ") + filename + " -o " + filename).c_str());
+  Assert (error == 0,
+         ExcInternalError());
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.