]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Exchange the pid of the master to the detached slave.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Sep 2002 21:28:41 +0000 (21:28 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 27 Sep 2002 21:28:41 +0000 (21:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@6547 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/sparse_direct.cc

index 2bba8eb3db46bafd88e03cac65b57f36749061f4..f0625e5e7a939717787bbc5ee2e0d73e85c4af4d 100644 (file)
@@ -390,8 +390,18 @@ SparseDirectMA27::initialize (const SparsityPattern &sp)
                        ExcMessage ("execv returned, which it is not supposed to do!"));
           std::exit(1);
         };
-                                       // parent process continues here.
-                                       // close unneeded end of pipe
+                                       // parent process continues
+                                       // here.  first thing is to
+                                       // send the process id of the
+                                       // present process. this is
+                                       // used to make sure that the
+                                       // client can end itself when
+                                       // it finds that the master
+                                       // process was somehow
+                                       // terminated without sending
+                                       // him this information
+      const pid_t parent_pid = std::getpid();
+      detached_mode_data->put (&parent_pid, 1, "parent_pid");
     };
   
   

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.