]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix obvious bugs.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2002 16:21:17 +0000 (16:21 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2002 16:21:17 +0000 (16:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@6599 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/hsl/source/detached_ma27.cc
deal.II/lac/source/sparse_direct.cc

index 96d79d5ef3b5e50982249607db37086bede0df82..17e13e2b7899e6e7e58a9f35abce405b4bc3aaec 100644 (file)
@@ -162,8 +162,8 @@ void put (const T *t, const size_t N, const char *debug_info)
                                        // is not interrupted
       int ret;
       do
-        ret = write (1, reinterpret_cast<const char *> (t),
-                     sizeof(T) * N);
+        ret = write (1, reinterpret_cast<const char *> (t) + count,
+                     sizeof(T) * N - count);
       while ((ret<0) && (errno==EINTR));
       if (ret < 0)
         die ("error on client side in 'put'", ret, errno);
index e789a5b3ee7eea2163f93ed123123e835fd331ae..90208928da1781ea1790cf76df1525b8628d552f 100644 (file)
@@ -239,6 +239,7 @@ namespace CommunicationsLog
 
   void list_communication () 
   {
+    sleep (random()%4);
                                      // make sure only one thread is
                                      // writing out at a time
     static Threads::ThreadMutex write_lock;
@@ -308,8 +309,6 @@ void monitor_child_liveness (const pid_t child_pid)
 {
   while (true)
     {
-      std::cerr << "+++ monitoring child " << child_pid << std::endl;
-      
       int ret = kill (child_pid, 0);
       if (ret != 0)
         if ((ret == -1) && (errno == ESRCH))
@@ -370,8 +369,8 @@ struct SparseDirectMA27::DetachedModeData
             int ret;
             do
               ret = write (server_client_pipe[1],
-                           reinterpret_cast<const char *> (t),
-                           sizeof(T) * N);
+                           reinterpret_cast<const char *> (t) + count,
+                           sizeof(T) * N - count);
             while ((ret<0) && (errno==EINTR));
             if (ret < 0)
               die ("error on client side in 'put'", ret, errno);

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.